SRI VIGNESH VIDYALAYA SENIOR SECONDARY SCHOOL.KOOTHUR.
STD:IX SUB:CS
UN-1&2 One Words
I.Choose the correct answer:
1. The command prompt in Python is
a) << b) <<< c) >>> d) >>
2. We can change the font and font size in the IDLE window by clicking _____.
a) Options→ Configure IDLE b) Change→Configure IDLE c) Format→Font & Color
d) Tools→ Configure text
3. To exit from the Python Shell window, we should type______command.
a)exit() b) quit() c) either a or b d) none of these
4. To execute thePython script,we have to choose
a)Run→ Run Module b)Run→Run c)Execute→ Run Script d)Execute→Run
5. The default number of blank spaces in the indentation is
a)5 b) 8 c) 4 d) 3
6. A _______ statement contains one or more other statements.
a)Simple b)function c)Compound d)all of these
7. _______Statements executive a set of statements repeatedly.
a)Looping b)alternative c)Selection d)Sequential
8. _____is/are not allowed in a variable name.
a)Uppercase letters b)numbers c)underscore(_) d)Blank space
9._______ Statement forces the next iteration of the loop to take place.
a)Constant b)Continue c)Break d)Iterate
10. Machine readable form of a program is called_____code.
a)Object b)Logical c)Byte d)source
11. ________Statements are executed in same order as written
a)Sequential b)Looping c)Selection d)Conditional
12. The shortcut for saving a file is
a)Alt +S b)Ctrl+S c)Ctrl+ALt+S d)F1
13. A ______ is used to specify the boundary between portions of the text in a program.
a)Array b) border c)token d)delimiter.
14. sum += 10 can be written as
a) sum= sum+10 b) sum=10 c) sum=+10 d)sum==10
15. Which one of the following is a token?
a)Functions b)Classes c)Operators d)Modules
16. The ___________exclusively used to enclose multiline string literal.
‘ a)Single quotes b)Double quotes c) triple quotes d) {}
17. Python language was developed by
a) Dennis Ritchie b) Rick Mascitti c) Bjarne Stroustrup d) Guido Van Rossum
18. Escape sequences begin with_____.
a) / b) # c) \ d) $
19. In Python _______function is used to display the results.
a) Cout b)print() c) printf() d)display()
20. There are_______ logical operator(s).
a)1 b) 2 c) 3 d) 4
21. _______statement is similar to implementing the which statement in C and C++.
a) If…..elif….else b) if…else c) if… d) case
22.________function specifies initial, final and the increment values in the loop.
a)print() b)range() c)sequence() d)input()
23. Python files are saved with the file extension_______.
a) .pyn b) .py c).python d) .pyt
24. ____statement is a null statement .
a)break b)pass c)exit d)continue
25. Multiple branching statement in Python among the following ____
a) If b)switch c) if…elif…else d) for
26. Not equal to operator is________.
a) = b) == c)!= d)all of these
27. Octal value is preceded by_____
a) 0b b)0o c)0h d)0x
28. If the code has any error, it will be shown in ________ colour.
a)Blue b) green c) yellow d)red
29. If a condition is false, it returns ___.
a)0 b)1 c)-1 d)any non-zero number
30. Which one of the following is not a numerical data type?
a)Float b)Complex c)Integer d)String
31.Single line commands in Python begin with
a): b)# c) // d)$
32. print(“Name=”,student)
a) Keyword in the above statement is print.
b) Literal in the above statement is Name=
c) Identifier in the above statement is student.
d) Delimiter in the above statement is “
33.The input() function reads the user’s input value and returns it as a ____
a) String b) integer c) Float d) None of these
34. ____ is a membership operator in Python.
a) + b) AND c) in d) NOT
35. The _____ parameter can be used to specify any special characters as a separator.
a) sep b) end c) string d) print
36. What do we use to define a block of code in Python language?
a) Key b) Brackets c) Indentation d) None of these
37. Which of the following is a valid identifier?
a) A.B.C,Ltd b) age1980 c) while d) 1980age
38. Which of the following is a logical operator?
a) >+ b) NOT c) <= d) ==
39. _____ statement forces the next iteration of the loop to take place.
a) Break b) Pass c) End d) Continue
Fill in the blanks:
1. Python was developed as a successor of the ABC programming language.
2. The int() function is used to convert string data into integer data explicitly.
3. IDLE stands for Integrated Development Learning Environment.
4. Relational operators are also known as comparative operators.
5. String literal is a group of characters enclosed within quotes.
6. Logical operators are used to combine conditional statements and evaluate them
7. \n escape sequence brings the characters that follow it to next line
8. Multiline commands should be enclosed within a pair of ‘’’ .
9. The input() function is used to accept puts from the user at run time of a program.
10. Alternative statements are also known as decision making statements.
11. A loop within another loop is called a nested loop.
12. Break statement transfers the control outside the loop.
13. While loop is used to execute A block statements repeatedly until the given condition
stays true.
14. Assignment(=) operator is used in Python to assign value to variables.
15. Logical operator AND returns ‘True’ only if all the conditions in the expression are true.
III. Match the following:
1. for i in range(40,24,-5):
print(i) – 40 35 30 25
2. 10//6 – 1
3. 10/6 – 1.66666666
4. 10%6 – 4
5. 4** 2 – 16
6. 10>=6 – True
7. for i in ( 20,30):
print(i) – 20,30
8. For i in range(24,40,5):
print(i) – 24 29 34 39
9. for i in range(6):
print(i) – 0 1 2 3 4 5
10. for i in range(1,8,2):
print(i) –1 3 5 7
11. i=10
print( i in range(5,20) – True.
12. a/=8 – a= a/8
13. print( “Looping\n Statements” – Looping
Statements
14. n=5
for i in range(1,3):
print(i,””,n,”=”, i*n) – 1*5=5
2*5=10
15. x,y,z=10,4.5,”Welcome”
print(z) – “Welcome”
IV. True or False:
1. A loop within another loop is called an internal loop. -False
2. F5 key is pressed to execute Python script . -True
3. Tokens are classified into five types. -True
4. 56 % 5 = 11. --False
5. Continue statement transfer the control outside the loop.
6. ‘for’ cannot be an identifier name. -True
7. Python was released during the year 1991. -True
8. In Python input() function accepts inputs from the users. True
9. Identifiers act on the operands to yield some value.-False
10. Python uses indentation as its method of grouping statements. -False