1. Write a Python script that asks the user to enter 4. Write a program that reads from user - () an
a length in centimetres. If the user enters a hour between 1 to 12 and (ii) number of hours
negative length, the program should tell the ahead. The program should then print the time
user that the entry is invalid. Otherwise, the after those many hours, e.g.,
program should convert the length to inches
and print out the result. There are 2.54 : Enter hour between 1-12 : 9
centimetres in an inch. How many hours ahead : 4
2. A store charges 120 per item if you buy less Time att that time would be : 18clock
than 10 items. If you buy between 10 and 99:
items, the cost is ? 100 per item. If you buy 100 3. Write a program to input two numbers and test
or more items, the cost is 70 per item. Write a it first number is divisible by the second
number
Or not.
program that asks the user how many items
they are buying and prints the total cost. 6. Write a short program to input a digit and
it in words.
print
3. Write aprogram to input length of three sides of
a triangle. Then check if these sides willform a 7. Write a short program to print first n odd
triangle or not. numbers in descending order.
(Rule is : a+ b>c; b +c> a;c+a > b)
a length in centimetres. If the user enters a hour between 1 to 12 and (ii) number of hours
negative length, the program should tell the ahead. The program should then print the time
user that the entry is invalid. Otherwise, the after those many hours, e.g.,
program should convert the length to inches
and print out the result. There are 2.54 : Enter hour between 1-12 : 9
centimetres in an inch. How many hours ahead : 4
2. A store charges 120 per item if you buy less Time att that time would be : 18clock
than 10 items. If you buy between 10 and 99:
items, the cost is ? 100 per item. If you buy 100 3. Write a program to input two numbers and test
or more items, the cost is 70 per item. Write a it first number is divisible by the second
number
Or not.
program that asks the user how many items
they are buying and prints the total cost. 6. Write a short program to input a digit and
it in words.
3. Write aprogram to input length of three sides of
a triangle. Then check if these sides willform a 7. Write a short program to print first n odd
triangle or not. numbers in descending order.
(Rule is : a+ b>c; b +c> a;c+a > b)