0% found this document useful (0 votes)
6 views2 pages

Python Assignment 01

Uploaded by

amnakhalidgsr
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)
6 views2 pages

Python Assignment 01

Uploaded by

amnakhalidgsr
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/ 2

Python Assignment - 01

Dear Students,​

Please complete the following Python programming exercises. This assignment is
due by Sunday. Make sure to submit it on time.

Assignment Questions:

1. Write a Python program to find the maximum between two numbers.


2. Write a Python program to find the maximum between three numbers.
3. Write a Python program to check whether a number is negative, positive or
zero.
4. Write a Python program to check whether a number is divisible by 5 and 11 or
not.
5. Write a Python program to check whether a number is even or odd.
6. Write a Python program to check whether a year is a leap year or not.
7. Write a Python program to input any alphabet and check whether it is vowel
or consonant.
8. Write a Python program to check whether a character is uppercase or
lowercase alphabet.
9. Write a Python program to input the week number and print weekday.
10. Write a Python program to input the month number and print the number of
days in that month.
11. Write a Python program to count the minimum number of notes in a given
amount.
12. Write a Python program to input marks of five subjects: Physics, Chemistry,
Biology, Mathematics, and Computer. Calculate percentage and grade according
to the following:​
Percentage >= 90% : Grade A​
Percentage >= 80% : Grade B​
Percentage >= 70% : Grade C​
Percentage >= 60% : Grade D​
Percentage >= 40% : Grade E​
Percentage < 40% : Grade F
13. Write a Python program to input the basic salary of an employee and
calculate its Gross salary according to the following:​
Basic Salary <= 10000 : HRA = 20%, DA = 80%​
Basic Salary <= 20000 : HRA = 25%, DA = 90%​
Basic Salary > 20000 : HRA = 30%, DA = 95%
14. Write a Python program to input electricity unit charges and calculate total
electricity bill according to the given condition:​
For the first 50 units Rs. 0.50/unit​
For the next 100 units Rs. 0.75/unit​
For the next 100 units Rs. 1.20/unit​
For units above 250 Rs. 1.50/unit​
An additional surcharge of 20% is added to the bill
15. Write a Python program to check whether a number is a prime number.
16. Write a Python program to print the multiplication table of a given number.
17. Write a Python program to calculate the factorial of a given number using
if-else.

Submission Link:

[Link]
MiUsgGR4Nj01TQHIcotQ/viewform?usp=header

You might also like