Practice Set 05 (Mixed Topic) - Python Programming

Publicado el: 24 enero 2024
en el canal de: Learn With Mr. RJ
6
0

Practice Set 05 (Mixed Topic) - Python Programming #python #learnpythonprogramming #pythoncourse ‪@LearnWithMrRJ‬

Here I am giving you some questions to solve, try yourself based on what I taught you earlier.
If you want a solution to this too, write me to the comment of the video.
I rose questions from across the web to give you more relevant exercises so that it might help you clarify your concept.

Chapters:
0:25 Check if a list contains an element 'Python'.
x = [5, 89, "Learn", 56, "Python", 98, "With", "Mr.", "RJ"]
0:36 How to iterate over two or more than two lists at the same time.
x = ["Learning", "is", "easy", "Learn", "Mr."]
y = ["Python", "very", "with", "With", "RJ"]
0:46 When to use a List and when to use a Dictionary?
0:55 What are the advantages of using Sets instead of Lists?
1:04 What are the uses of tuple and list, when to use them?
1:14 How to do string slicing and reverse string?
1:22 Find the sum of all the numbers in the list.
x = [25, 64, 85, 91, -89, 23, -16]
1:31 Sort list elements in ascending and descending order.
x = [25, 13, 92, 1, 80, 5]
1:41 Can we use the 'sort()' function when we have mixed data types in a list?
x = [22, "Learn", 3, "Python", 28, 93]
1:51 When to use sort() and when to use sorted()? What is the purpose of both?
2:02 When to use the 'for' loop and when to use the 'while' loop?
2:11 Select only prime numbers from the list and print the new list with only prime numbers.
x = [5, 8, 58, 71, 21, 31, 53, 91]
2:22 On the basis of marks obtained in Common Eligibility Test, you will be allotted a course for further studies.
Total marks = 100, minimum score is above 40 to crack the exam
If you have scored above 90 - then you will be allowed to choose either medical or engineering
If you have scored above 70 upto 90 - then you will be allowed to choose either Business studies or Commerce
If you have scored above 40 upto 70 - then you will be allowed to choose either Political science or Humanities
3:11 Draw a diamond pattern as shown below.
*
***
*****
*******
*********
*******
*****
***
*
3:19 Does the list element start with vowels? If yes, print only those elements.
vowels = ["a", "e", "i", "o", "u"]
x = ["alphabet", "computer", "information", "internet", "data", "fiber"]
3:35 What is the benefit of using 'else' statement with 'while' loop?
3:44 When do we use a 'break statement' and when a 'continue statement'?
3:54 Print a 23 Times table.
4:02 Print a number as many times as the value of that number using a 'while' loop. Print it from 1 to 9.
eg.
1
22
333
And so on upto 9
4:21 Turn the two lists into one dictionary and print it.
x = [0, 1, 2, 3, 4]
y = ["Learn", "Python", "With", "Mr.", "RJ"]

Join the Telegram channel https://t.me/LearnWithMrRJ to get practice questions and other updates.

#python #pythonprogramming #pythontutorial #pythonforbeginners #pythonfullcourse #learnpython #learnpythonprogramming #pythoncourse #pythontutorialforbeginners #python3


En esta página del sitio puede ver el video en línea Practice Set 05 (Mixed Topic) - Python Programming de Duración hora minuto segunda en buena calidad , que subió el usuario Learn With Mr. RJ 24 enero 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 6 veces y le gustó 0 a los espectadores. Disfruta viendo!