Revision Test 1
Revision Test 1
Revision Test 1
Q1. Which of the following is not considered a valid identifier in Python? ( 1 mark questions)
(i)three3 (ii)_min (iii) hello_kv1 (iv) 2thousand
Q3. Which of the following statements converts a tuple into a list in Python:
(i) len(tup) (ii) list(tup) (iii) tup(list) (iv) List(tup)
Q10. Name the built-in mathematical function / method that is used to return square root
of a number.
i)sqr() ii)sqrt() iii) sqt() iv) square()
Q12. i) Convert the following for loop into while loop. (2 marks)
for i in range(10,20,5):
print(i)
ii) >>>not False and True or False and True iii. s= “This is my book”
print(s.split(“is”,1))
Q.13. Rewrite the correct code and underline the corrections. (3 marks)
x = int((“enter the value”))
for i in range [0,11]:
if x = y
print x+y
else:
print x-y