Python Revision tour - 1 || Type C || Sumita Arora || Class 12 || Computer science || Information practices || Solution ||
Q 1 = write a program to print one of the words negative ,zero or positive . according to whether variable x is less than 0 , 0 or greater than 0 respectively .
Q2 = write a program that return True if the input number is an even number , False otherwise .
Q 3 = Write a python program that calculates and prints the number of seconds in a year .
Q 4 = Write a python program that accepts two integers from the user and print a message saying if first number is divisible by second number or if it is not .
Q 5 = write a program that ask the user the day number in the year in the range 2 to 365 and ask the first day of the year Sunday or Monday or Tuesday e.t.c . then the program should display the day on the day number that has been input .
Q 6 = one foot equals 12 inches . write a function that accept a length written in feet as an argument and returns this length written in inches . write a second function that ask the user for a number of feet and return this value . write a third function that accept a number of inches and display this to the screen . use these three functions to write a program that asks the user for a number of feet and tells them the corresponding number of inches .
Q7 = Write a program that reads an integer N from the keyboards computes and displays the sum of numbers from N to (2*N) if N is nonnegative. If N is a negative number , then it’s the sum of the numbers from (2*N) to N . the starting and ending points are included in the sum .
Q 8 = Write a program that reads a date as an integers in the format MMDDYYYY . the program will call a function that prints print out the date in the format <month name > <day>,<year> .
Q 9 = Write a program that prints a table on two columns – table that helps converting miles into kilometers .
Q 10 = Write another program printing a table with two columns that helps convert pounds in kilograms .
Q 11 = write a program that reads two times in military format and prints the number of hours and minutes between the two times .
Python Revision tour - 1 || Type C || Sumita Arora || Class 12 || Computer science || Information practices || Solution || |
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )