Python Test Class 7
Python Test Class 7
1.____________ is a term used to describe the electronics and mechanical parts of the computer.
2. ___________ is a high level programming language.
3. IDLE stands for ______________________________________.
4. _____________ refers to the spaces at the beginning of a code line.
5. A variable name must start with a ___________ or the _____________ character.
6. ___________ also known as int, is a whole number, positive or negative, without decimals of unlimited length.
7. ___________ are written with a “j” as the imaginary part.
8. The __________ is a sequence of characters like a simple text “Hello World”.
9. _________ command is used to delete a list element.
10. Errors in typing the commands and variables are called ____________.
Q2. Multiple Choice Questions: (5)
1. Is python case sensitive when dealing with identifiers?
a. No
b. Yes
c. Machine dependent
d. None of the mentioned
2. Which of the following is the correct extension of the Python file?
a. .python
b. .pl
c. .py
d. .p
3. Which keyword is used for function in Python language?
a. Function
b. def
c. Fun
d. Define
4. Which of the following character is used to give single-line comments in Python?
a. //
b. #
c. !
d. /*
5. Which of the following function is a built-in function in python?
a. factorial()
b. print()
c. seed()
d. sqrt()
Q3. Coding Time (5)
1. Write a sample code for simple “if” condition?