Python : Conditional Statement Test 2

Q1. Write a program to accept percentage from the user and display the grade according to the following criteria:

                    Marks                                    Grade

                    > 90                                        A

                   >80 and <=90                          B

                   >=60 and <80                          C

                   below 60                                  D

Q2. Write a program to accept the cost price of a bike and display the road tax to be paid according to the following criteria :

                                   

Q3. Write a program to check whether an years is leap year or not.

Q4. Write a program to accept a number from 1 to 7 and dsplay the name of the day like 1 for Sunday , 2 for monday and so on.

Q5. Write a progam to accept a number from 1 to 12 and display name of the month and days in that month like 1 for january and number of days 31 .......

Q6. What do you mean by statement?

Q7. Write the output of the following:
                    if True:
                        print(101)
                    else:
                        print(202)
Q8. Write the logical expression for the following:
  1. A is greater than B and C is greater than D
Q9. Accept any city from the user and display monument of that city
                        
Q10. Write the output of the following if a = 9
            if (a > 5 and a <=10):
                print("Hello")
            else:
                print("Bye")

2 comments:

Most Recently Published

File Handling Test 6

 File Handling Test 6 Q1 . Do we need to use the close() function when we use 'with' statement to open a file? Q2. Which mode you wi...

CS - IP Assignment/Worksheet