Sample Paper Unit Test 1 Grade 11
Sample Paper Unit Test 1 Grade 11
18. Taniya wants to make a fun program , if user enters any number a Good or funny 1
message will appear . She is confused that which is the most suitable control to be
used to make such program. Help her to choose correct option.
a. If b. if else c. if elif d. Nested if else
19. If the user input: 1, what does the following code snippet print? 1
x = float(input ())
if(x==1):
print("Yes")
elif (x >= 2):
print("Maybe")
else:
print ("No")
SECTION B
Answer the following questions: (2 x 4 = 8 marks)
21. 2
3/4
22. 2
SECTION C
Answer the following questions: (3x4=12marks)
25. What is the difference between else and elif construct of if statement? 3
26. Draw a flowchart to find Area of a rectangle. 3
28. Write a program that prints minimum and maximum of five numbers entered by the 3
user.
SECTION D
29. WAP a program to accept a character from the user and display whether it is vowel or 5
consonant.
30. Write a menu driven program that has options to 5
• accept the marks of the student in five major subjects in Class X and display the
same.
• calculate the sum of the marks of all subjects.
Divide the total marks by number of subjects (i.e. 5),
calculate percentage = total marks/5 and display the percentage.
Find the grade of the student as per the following criteria:
Criteria
Grade percentage > 85 A
percentage < 85 && percentage >= 75 B
percentage < 75 && percentage >= 50 C
percentage > 30 && percentage <= 50 D percentage
4/4