Python Questoins 8.june2025
Python Questoins 8.june2025
for r in range( ):
for c in range( ):
str1+= +"\t"
print str1
Question 2
## 1 2 3 4 5 4 3 2 1 0 ( output numbers)
for i in range(1,11,1):
if( ):
print ( ,end=" ")
else:
print ( ,end=" ")
## 2 4 6 8 10 18 21 24 27 30 ( output numbers)
for i in range(1,11,1):
if( ):
print ( ,end=" ")
else:
print ( ,end=" ")
## 1 2 3 4 5 7 9 11 13 15 ( output numbers)
for i in range(1,11,1):
if( ):
print ( ,end=" ")
else:
print ( ,end=" ")
Question 3. Using List Array
List=[]
a) To add student name to List array input from the keyboard (total five student name )
b) Display List Array
c) Search data into from List Array (student name accept from the keyboard to search into List
Array)
Question 4
Write a program to find factorial value of given number accept from the keyboard until input number is
zero. ( Using Nested While Looping )
Hint: if input num is 5 5*4*3*2*1=120
if input num is 3 3*2*1 = 6
if input num is 0 exit while loop
Question 5.
Write a program to determine and output pass or fail or invalid mark. Given Two subject accept from the
keyboard.
Sub1=int(input(“Enter sub1 mark))
Sub2=int(input(“Enter sub2 mark))
If(( ) ( ) ):
……………
elif(( ) ( )):
……………..
else:
……………….