Asnmt 2
Asnmt 2
1.Write a Python program that checks whether a given number is positive, negative, or zero.
2.Write a Python program that takes an integer input from the user and checks whether the number is
even or odd.
3.Write a Python program to determine if a given year is a leap year. A leap year is divisible by 4 but not
by 100, except if it is also divisible by 400.
4.Write a Python program that takes a student's score as input and prints the corresponding grade
based on the following criteria:
- A: 90-100
- B: 80-89
- C: 70-79
- D: 60-69
- F: below 60
5.Write a Python program that takes three numbers as input and prints the largest of the three.
6.Write a Python program that takes a single character from the user and checks whether it is a vowel
(a, e, i, o, u) or a consonant.
7.Write a Python program that takes the user's age as input and determines which age group they
belong to:
8.Write a Python program that checks if a given number is divisible by both 5 and 11.
9. Write a Python program that takes an integer (1-7) as input and prints the corresponding day of the
week (1 for Monday, 2 for Tuesday, ..., 7 for Sunday).
10.Write a Python program that takes a username and password as input and checks if they match pre-
defined credentials. If they match, print "Access Granted"; otherwise, print "Access Denied".