You are on page 1of 3

Revision Question Bank

1.Write down any three features of python programming.


2. What is the name of the variable list in following example?

3. What will be the effect of the following script?

Ans: Sprite will move backward when you press the right arrow key.
4. Which character is used in Python to start a new line?
Ans: “\n”
5 . Why do we need an editor to create a Python program?
Ans: Python allows us to execute instructions at the command prompt.However, we cannot
type a program having multiple instructions at the prompt every time we want to run it.
Therefore, we need an editor using which we can save our source programs and run them any
number of times
6.Explain character and string data types used in Python programming?
Ans: If a variable stores a character like ‘A’, ‘B’, ‘1’, ‘2’ or ‘#’ it is called a character data type.
If a variable stores a sequence of characters such as “qwerty” or “Ab@321”, it is called a string
data type.
7. Explain the use of following blocks in scratch.

a. b.
8. Answer the questions based on the following Python program.
p= 18
q= 'Pinky'
r= 23.55
print("My name is: ", q)
print("\n I am " ,p,”Years old”)

i.What type of data we have assigned to the variable “p”?


Ans: Numeric(integer)
ii. T o which variable have we assigned the string data?
Ans: Variable “q”
iii.What will be the output of the given code?
Ans: My name is Pinky
I am 18 Years old
9. Write a Python program that accepts two numbers from the user and performs the
Addition and subtraction of the two numbers.
Ans:
n1= int(input("Enter the first number= "))
n2= int(input("Enter the second number= "))
sum= n1+n2
print("The addition of two number is= ",Sum)
Sub= n1-n2
print("The difference between two numbers is= ",Sub)
10. What is the use of generating random numbers in Scratch?
11. What is the difference between variable and variable list?
12. Explain the count() and strip() string functions.
13. What are comments used for in Python? How do you indicate a comment?
14. Observe the following script and answer the questions.

a. Write the name of the variable used in above script.


Ans: Score
b. What is the initial value of Score?
Ans: 8
c. What will be the output of the script?
Ans: You are qualified for second level.
d. What will be the output of the program if the value of score is 12?
Ans: You are qualified for second level
e. What will be the output of the program if the value of score is 5?
Ans: You are not qualified for second level

You might also like