0% found this document useful (0 votes)
19 views1 page

XI Worksheet1 Conditions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

XI Worksheet1 Conditions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Worksheet 2

Topic: Conditional Statements

Q.1 What will be output of the following code fragment if the input given is 10.1

a = input(‘Enter a number’)
if(a= = 5) :
print(“five”)
else:
print(“Not Five”)
Q.2 Write a program to calculate BMI of a person after inputting its weight and height and then print its
nutritional status as per the following table:3

Nutritional Status WHO criteria BMI cut-off


Underweight < 18.5
Normal 18.5 – 24.9
Overweight 25 – 29.9
Obese >- 30
Q.3 Define a function get Bigger Number (x,y) to take in two numbers and return the bigger of them.
Q.4 Write a program that accepts three numbers and prints them in descending order.
Q.5 What is the output of following code:
if(4+5 = = 10) :
print(“True”)
else :
print(“False”)
print(“True”)
Q.6 Rewrite the following code fragment that saves on the number of comparision:
if(a = = 0):
print(“Zero”)
if(a= = 1):
print(“One”)
if(a = = 2):
print(“Two”)
if(a= = 3):
print(“Three”)
Q.7 Write a program to check whether entered year is leap year or not.
Q.8 Write a program to check whether entered number is even or odd.
Q.9 Write a program that reads two numbers and an arithmetic operator and displays the computed result.
Q.10 Write a program to calculate the amount payable after sales discount, which is 10 % up to the sales amount of
20000 and 17.5% on amount above that. There is sales tax payable (in range 5-12%) at the discounted price.

You might also like