Conditional and Iterative Statements || Type C || Sumita Arora || Class 11 || Computer science || Information practices || Solution
Q 1= write a python script that ask the user to enter a length in centimeters .if the user enters a negative length , the program should tell the user that the entry is invalid . otherwise ,the program should convert the length to inches and print out the result . there are 2.54 centimeters in an inch.
Q 2 = A store charges RS 120 per item if you buy less than 10 items . if you buy between 10 and 99 items ,the cost is RS100 per item . if you buy more items , the cost is RS 70 the user how many items they are buying and print the total cost .
Q 4 = a year is a leap year if it is divisible by 100 are not leap year unless they are also divisible by 400 . write a program that asks the user for a year and print out weather it is a leap year or not .
Q11 = write a program to input 3 sides of triangle and print whether it is an equilateral
, scalene or isosceles triangle .
, scalene or isosceles triangle .
Q 12 = write a program to take an integer “a” as an input and check whether it ends with 4 or 8 .if its ends with 4 , print “ends with 4 “, if it end with 8 ,print “ends with 8”, otherwise print “ ends with neither ” .
Q 13 =write a program to take N(N>20) as an input from the user . print number from 11 to N .when the number is multiple of 3 ,print , “ tipsy ” . when it is multiple of 7 print “topsy ”
.when it is a multiple of both print “tipsyTopsy”.
.when it is a multiple of both print “tipsyTopsy”.
Q 14 = write a short program to find largest number of the list of number entered through keyboard .
Q 17 = write a complete python program to do the following ;
(a) read an integer X .
(b) determine the number of digit n in X .
(c)from an integer Y that has the number of digit n at tens place and the most significant
Digit of X at ones place .
(d)output Y
(a) read an integer X .
(b) determine the number of digit n in X .
(c)from an integer Y that has the number of digit n at tens place and the most significant
Digit of X at ones place .
(d)output Y
Q 19 = write python program to sum the given sequences :
(a): 2/9 – 5/13+18/17………(print 7 th term )
(b): 12 + 3 2 + 52+…….+n2 (input n)
(a): 2/9 – 5/13+18/17………(print 7 th term )
(b): 12 + 3 2 + 52+…….+n2 (input n)
Q 21 = write a program to accept the age of an employees and count the number of person in the following age group .
(a) 26-35
(b) 36-45
(c) 46-55
(a) 26-35
(b) 36-45
(c) 46-55
Q 22 = write a program to find the sum of the following series :
(a) x – x2 /2! + x3/3! …….. – x6/6!
(b) x + x2/2 ……… + xn/n (input x and n both)
(a) x – x2 /2! + x3/3! …….. – x6/6!
(b) x + x2/2 ……… + xn/n (input x and n both)
Q 23 = write program to print the following shapes :
a.
Q 24 = write programs using nested loops to produce the following pattern :
(i) A
A B
A B C
A B C D
A B C D E
A B C D E F
(ii) 0
22
444
8888
a.
Q 24 = write programs using nested loops to produce the following pattern :
(i) A
A B
A B C
A B C D
A B C D E
A B C D E F
(ii) 0
22
444
8888
Q 25 = write a program using nested loops to produce rectangle of *’s with 6 rows and 20 *’s per row .
Q 26 = given three number A ,B and C . write a program to write their values in an ascending order . for example A= 12,B=10 and C = 15 ,
your program should print out :
Smallest number = 10
Next higher number = 12
Highest number = 15
your program should print out :
Smallest number = 10
Next higher number = 12
Highest number = 15
Q 27 = write a python script to input temperature . then ask them what unit , Celsius or Fahrenheit , the temperature is in . your program should convert the temperature to other unit . the conversions are F = 9/5 C + 32 and C= 5/9(F – 32).
Q 28 = ask the user to enter a temperature in Celsius . the program should print a message based on the temperature :
(i)if the temperature is less than -273.15 print that the temperature is invalid because it is below absolute zero :
(ii)if is exactly -273.15 ,print that the temperature is absolute 0 .
(iii)if the temperature is between -273.15 and 0 ,print that the temperature is below freezing .
(iv)if it is 0 ,print that the temperature is at the freezing point .
(v)if it is between 0 and 100 , print that the temperature is in the normal range .
(vi)if it is 100 ,print that the temperature is at the boiling point .
(vii) if it above 100 , print that the temperature is above the boiling point .
(i)if the temperature is less than -273.15 print that the temperature is invalid because it is below absolute zero :
(ii)if is exactly -273.15 ,print that the temperature is absolute 0 .
(iii)if the temperature is between -273.15 and 0 ,print that the temperature is below freezing .
(iv)if it is 0 ,print that the temperature is at the freezing point .
(v)if it is between 0 and 100 , print that the temperature is in the normal range .
(vi)if it is 100 ,print that the temperature is at the boiling point .
(vii) if it above 100 , print that the temperature is above the boiling point .
Conditional and Iterative Statements Sumita arora class 11 Type c solution |
write a program to display all of the integers from 1 up to and including some integer entered by the user followed by a list of each number's prime factors.Numbers greater than 1 that only have a single primw factor will be marked as prime.
ReplyDeleteplease bro reply fast i need before tommorrow
You solution of this Question from https://pathwala.blogspot.com/2020/10/write-program-to-display-all-of.html
DeleteThank you for useful notes and important questions regarding conditional and iterative statements.
ReplyDeleteWelcome : )
DeleteWhat are Python looping statements ?
ReplyDeleteStatement that allows a set of instruction to be perform repeatedly called lopping statement or Loop .
DeleteWrite a short program to input a digit and print it in words.
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )