You are on page 1of 2

DELHI PUBLIC SCHOOL AGRA

(Under the aegis of the Delhi Public School Society, East of Kailash, New Delhi)

Computer Science
Weekly Test-4 Sample Paper (2022-23)
Grade VI

1. Which of the following is a valid name of a variable?


a. 12SUM b. S_u_m c. s@U@M d. num@
2. Which of the following is an example of keywords used in python?
a. PRINT b. print c. INPUT d. Input
3. Find the output of the following program:
xyz = "Hello"
print(xyz, “how are you?”)

a. xyz, “how are you?” b. Hello, “how are you?”


c. Hello, how are you? d. Hello how are you?
4. 4. Find the output of the following program:
X= 10
print(“ Perimeter of the square is :”, 4*X)
print (“****”)
a. Perimeter of the square is :, 4*X b. Perimeter of the square is : 4*X
**** ****

c. Perimeter of the square is : 4*10 d. Perimeter of the square is : 40


**** ****

5. Find the output of the following program if a =12 and b= 10


a =int(input(“Enter first number: “))
b = int(input(“Enter second number: “))
# calculating Multiplication
mult = a*b
print('’The multiplication of two numbers is:” ,mult)
a. '’The multiplication of two numbers is:” ,120 b. The multiplication of two numbers is: ,120

c. # calculating Multiplication d. calculating Multiplication


The multiplication of two numbers is:120 The multiplication of two numbers is:120

6. A. We can use colon to separate names of variables.


B. Some Keywords can be used as variable names
a. Both statements A & B are true b. Both statements A & B are False
c. Statement A is true, But B is false d. Statement A is False but B is True
7. The _________function prints the specified message to the screen, or other standard
output device.
a. Input() b. Print() c. print() d. input()
8. Find the output of the following program:
Sub1= int(input("Enter marks of English: "))
Sub2 = int(input("Enter marks of Math: "))
Sub3 = int(input("Enter marks of EVS: "))
Sub4 = int(input("Enter marks of Hindi: "))
print(“ Riya your Total Marks :”)
print("Total Marks of all subjects are:”, Sub1+Sub2+Sub3+Sub4)
a. Enter marks of English: 80 b. Enter marks of English: 80
Enter marks of Math: 75 Enter marks of Math: 75
Enter marks of EVS: 65 Enter marks of EVS: 65
Enter marks of Hindi: 70 Enter marks of Hindi: 70
Riya your Total Marks : Total Marks of all subjects are: 290
Total Marks of all subjects are: 80+75+65+70

c. Enter marks of English: 80 d. Enter marks of English: 80


Enter marks of Math: 75 Enter marks of Math: 75
Enter marks of EVS: 65 Enter marks of EVS: 65
Enter marks of Hindi: 70 Enter marks of Hindi: 70
Riya your Total Marks : Riya your Total Marks :
Total Marks of all subjects are: 290 Total Marks of all subjects are:
Sub1+Sub2+Sub3+Sub4

9. Find the error and rewrite the following Program:


age = input(int("Enter your age: "))
new = age + 1
name = input("Enter your name: ")
print("Hey! " + name + ‘Next year you will be " + new)
a. age = int(input("Enter your age: ")) b. age = int(input("Enter your age: "))
new = age + 1 new = age + 1
name = input("Enter your name: ") name = input("Enter your name: ")
print("Hey! " + name + Next year you will be + new) print("Hey! " + name + " Next year you will be " + new)

c. age = int(input("Enter your age: ")) d. age = int(input("Enter your age: "))
new = age + 1 new = “age” + 1
name = input("Enter your name: ") name = input("Enter your name: ")
print("Hey! " + name + " Next year you will be " + new) print("Hey! " + name + " Next year you will be " + new)

10. Multiple words in Python can be separated using a/an ______________.


a. White spaces b. Underscore c. separators d. brackets

You might also like