Tuesday, December 10, 2019

Python Assignment - 1


Q1: Write a program in Python to enter a number and check whether the number is even or odd.

Q2: Write a program in Python to enter two numbers and find the greater number.

Q3: Write a program in Python to enter a year and check it is leap year or not.

Q4: Write a program in Python to enter the percentage of a student and display the grade as per   

       following details.
     
Percentage
Grade
0-39.99
D
40-59.99
C
60-79.99
B
80-100
A

Q5: Write a program in Python to enter a number and check whether it is prime or not.

Q6: Write a program in Python to print all prime numbers from 2 to 100.

Q7: Write a program in Python to enter a number and check whether it is Armstrong number or not.

Q8: Write a program in Python to print all Armstrong numbers from 1 to 1000.

Q9: Write a program in Python to enter a number and find the sum of digits of the number.

Q10: Write a program in Python to enter a number and find the product of digits of the number.

Q11: Write a program in Python to enter a number and find the factorial of the number.

Q12: Write a program in Python to display the Fibonacci Series up to 8 terms.

Q13. Write a program in Python to enter a number and find the factorial using recursion.

No comments:

Post a Comment