PODAR INTERNATIONAL SCHOOL
Exit Task
Subject: Computer Studies Std: VI
Topics: Variables, Adding comments, Performing calculations in Python
Learning Outcome:
define and create variables in Python
identify and apply rules for creating valid variable names
understand and work with different data types in Python
use comments to enhance code readability
perform arithmetic operations using Python
write programs to accept user input and manipulate it
Choose the correct option.
1. Which of the following statements is incorrect about
comments in Python programming?
a. Comments make the code more complex.
b. Comments can be used to explain a part of the Python
code.
c. Comments can be used to prevent the execution of
some code while testing.
2. Aliya is trying to write a code in Python to add two numbers
using variables, but she is getting some errors. This is the
code:
a= 14
b== 15
Print(a+b)
What do you think is the error in this code?.
a. The value of variable “b” is not assigned properly.
b. The print command is not correct.
c. The value of variable “a” is not assigned properly.
3. Identify the correct syntax for adding a comment in a
Python program.
a. #This is a comment
CB/VI/24-25 Introduction to Python Page
1 of 2
b. /This is a comment
c. *This is a comment
d. %This is a comment
4. Rahul is writing a Python program and wants to use the
following variable names:
score_1
age
_marks
2players
Which of these variable names is invalid?
a. 2players
b. _marks
c. age
d. score_1
5. A program asks for the user's age using the command:
age = input("Enter your age: ")
What will be the data type of age?
a. String
b. Integer
c. Float
d. Boolean
6. What will be the output of the following code, if the user
enters 20.
num = input("Enter a number: ")
num = int(num)
print(num + 10)
a. Error
b. 30
c. 2010
d. 20
CB/VI/24-25 Introduction to Python Page
2 of 2