Flow of Control || Type C || Sumita Arora || Class 11 || Computer science || Information practices || Solution
Q1. 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.
Q2. 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 .
Q3. Write a program that reads from user -
(i) An hour between 1 to 12 and
(ii) Number of hours ahead. The program should then print the time after those many hours.
Q5. 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 .
Q12. Write a program to input 3 sides of triangle and print whether it is an equilateral
, scalene or isosceles triangle .
, scalene or isosceles triangle .
Q13. 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 ” .
Q14. 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”.
Q18. 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
Q20. 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)
Q22. 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
Q23. 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)
Q24. Write program to print the following shapes :
a.
Q25. 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.
Q25. 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
Q26. Write a program using nested loops to produce rectangle of *’s with 6 rows and 20 *’s per row .
Q27. 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
Q28. 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).
Q29. Ak 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 .
Ques3 is not opening please fix it's urgent
ReplyDeleteIt is fixed Please try again..
DeleteThis comment has been removed by the author.
ReplyDeletePlease also send solution of question 25th (3rd and 4th question)
ReplyDeleteIt's urgent please
DeleteTell me question
DeleteThis website is soo good, you are like a god to me, your videos help me understand stuff that other websites dont and in such a friendly manner
ReplyDeleteKEEP IT UP!
Always Welcome : )
Deletewwwwwwwwwwwwwwwwwwwwwwwwwwwwwasrttttttttttttttttttttttttttteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
ReplyDeleteelish 603
ReplyDeleteOMG, I like this website so much, You're like Allah to me, You provide useful codes and tips but next time, please teach us how to find the answers from syntax problems. Mashallah, Allahuakbar, May Allah bless u and An Alhamdullilah for all the many years. Long live Osama The Path Walla.
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )