0% found this document useful (0 votes)
3 views

Control_Statements_and_Conditions

Uploaded by

amitgomladu57
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Control_Statements_and_Conditions

Uploaded by

amitgomladu57
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Python Module-2 Assignment

Module -2 Assignment
1) Write a program to find whether a given number(accept from the
user) is even or odd and print the message to the user
accordingly.

2) Write a program to find whether a given number(accept from the


user) is greater then or less then and print the message to the
user accordingly.
Module -2 Assignment
3) Write a program to find out the grade of given percentage value
(accept from the user) and print the message according given
criteria:
• Greater then 70% print A grade message to the user.
• Greater then 65% and less then 70% print B+ grade message to the user.
• Greater then 60% and less then 65% print B grade message to the user.
• Greater then 55% and less then 60% print C grade message to the user.
• Less then 55% print Fail message to the user.

4) Write program to generate 1 to 10 value using the loop.


Module -2 Assignment
5) Write a program to generate 10 to 1 values using the for loop.

6) Write a program to print following pattern:

*
**
***
****
*****
Module -2 Assignment
7) Write a program to print following pattern:

1
12
123
1234

8) Write a program to convert this string “hello python” into uppercase using
string built-in function.

9) Write a program to convert this string “HELLO PYTHON” into lowercase using
string built-in function.

You might also like