Welcome to Day 5 of our Python series!
In this video, we’re doing a quick Q&A revision covering everything from Day 1 to Day 4 — including:
1️⃣ Installation & Print Function
2️⃣ Variables, Input, and Data Types
3️⃣ Operators and If-Else Statements
4️⃣ For & While Loops
Perfect for beginners who want to test their understanding before moving ahead.
Watch till the end and try to answer along with me! 💡
👉 Questions Covered:
1. Installation and Print Function
Q. What is the difference between print("Hello") and print('Hello') in Python?
A. There is no such major difference , but there is a use case to quote our string while printing on screen using both of our quotes
Q. How do you print multiple values in one statement (e.g., name and age together)?
A. print(f'{a} is my name and my age is {b}') by this we can pass our values in variable and they will be printed on screen-- print(a,"text",b)
Q. What happens if you use print() without any arguments?
A. Nothing , output screen will be blank
2. Variables, Input, and Data Types
Q. What will be the data type of x = input("Enter number: ") if you type 5?
A. String , will be the data type how wever we can convert it to integer at any point of time in program by using type casting
Q.How do you convert a string input into an integer in Python?
A.using int() function we can type cast string into integer , by putting input() function inside int() function
Q.What is the difference between mutable and immutable data types? Give one example of each.
A. We will see next time
3. Operators and If-Else Statement
Q. What is the difference between == and = in Python?
A. == is a comparison operator use to compare both left hand side , and right hand side to get True or false
= is a assignment operator us to assign right hand side values to left side variable
Q. Write a simple if-else statement to check if a number is even or odd.
A.
Number=int(input("Enter a number to be checked is even or odd: "))
if Number%2==0:
print(f"{Number} is Even")
else:
print(f"{Number} is odd")
Q. What will be the output of this code?
a, b = 10, 20
if a greater b:
print("A is big")
else:
print("B is big")
A. print("B is big")
#4. For and While Loops
Q. Write a for loop to print numbers from 1 to 5.
A.
for i in range(1,6):
print(i)
Q. What is the difference between a for loop and a while loop?
A. For loop is counted and iterate for fix ranges, while is conditional based loop iterates till condition fails
What will be the output of the following code?
i = 1
while i less= 3:
print("Hello")
i += 1
Auf dieser Seite können Sie das Online-Video Python #5 | Python Q&A – Installation, Variables, Operators, Loops | Python Revision for Beginners mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Lyusic 12 Oktober 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 11 Mal angesehen und es wurde von 1 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!