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

FINAL_EXAM

Not suitable

Uploaded by

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

FINAL_EXAM

Not suitable

Uploaded by

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

1.

Input and Output: Write a program that takes a user's name as input and prints "Hello,
<name>!".

2. Simple Calculator: Take two numbers as input and print their sum, difference, product, and
quotient.

3. Name Length: Write a program that takes a name as input and prints the length of the name.

4. Even/Odd Checker: Write a program to check if a number entered by the user is even or odd.

5. Positive/Negative Checker: Write a program that checks if the input number is positive,
negative, or zero.

6. Age Calculator: Input the birth year and calculate the age of the user.

7. Circle Area: Write a program that takes the radius of a circle as input and calculates the area
(use πr²).

8. Temperature Conversion: Write a program that converts temperature from Celsius to


Fahrenheit.

9. Sum of Digits: Input a number and calculate the sum of its digits.

10. Grade Calculation: Write a program to calculate the grade based on marks entered by the user.

11. Leap Year Checker: Write a program to check if a year is a leap year.

12. Divisibility Test: Write a program that checks if a number is divisible by both 2 and 3.

13. Vowel or Consonant: Check whether the entered character is a vowel or consonant.

14. Largest of Three Numbers: Write a program to find the largest of three numbers.

15. Triangle Type: Input three sides of a triangle and check if the triangle is equilateral, isosceles, or
scalene.

16. Grade Checker: Based on a score input, print the corresponding grade ('A', 'B', 'C', etc.).

17. Multiple of 5 or 10: Check whether a number is a multiple of 5 or 10.

18. Login System: Create a simple login system where the user enters username and password, and
the program checks if they are correct.

19. Voting Eligibility: Write a program that checks if a person is eligible to vote (age ≥ 18).

20. Odd/Even Range Checker: Write a program that checks whether numbers from 1 to a given
number are odd or even.

21. Print Numbers 1 to N: Write a program to print numbers from 1 to N.

22. Multiplication Table: Take a number input and print its multiplication table (1-10).

23. Sum of Numbers 1 to N: Write a program to find the sum of numbers from 1 to N using a loop.

24. Factorial Calculation: Calculate the factorial of a number using a loop.


25. Fibonacci Series: Write a program that prints the Fibonacci series up to the nth term.

26. Prime Number Checker: Write a program that checks if a number is prime.

27. Palindrome Checker: Write a program to check if a string is a palindrome.

28. Even Numbers in Range: Write a program to print all even numbers between two given
numbers.

29. Sum of Digits: Calculate the sum of digits of a number using a loop.

30. Pattern Printing: Print a pyramid-like pattern using stars or numbers.

31. Factorial Using Function: Write a function that calculates the factorial of a number.

32. Prime Number Checker Using Function: Write a function to check if a number is prime.

33. Recursive Fibonacci: Write a recursive function to find the nth Fibonacci number.

34. Even/Odd Function: Write a function to check if a number is even or odd.

35. String Reversal Function: Write a function that takes a string as input and returns it reversed.

36. Max of Three Numbers: Write a function to find the maximum of three numbers.

37. Palindrome Function: Write a function to check if a string is a palindrome.

38. Count Vowels: Write a function to count the number of vowels in a string.

39. GCD and LCM: Write functions to find the greatest common divisor (GCD) and least common
multiple (LCM) of two numbers.

40. Perfect Number Check: Write a function to check if a number is perfect (sum of its divisors
equals the number).

41. Current Date and Time: Write a program to print the current date and time.

42. Days Between Dates: Write a program that calculates the number of days between two dates.

43. Convert Date to String: Convert a given date in the form of YYYY-MM-DD into a string in the
format "DD-MMM-YYYY".

44. Age in Days: Calculate the age in terms of days given a birthdate.

45. Time Difference: Write a program that calculates the time difference between two given times
(in hours, minutes, and seconds).

46. Date Formatting: Write a program that accepts a date and formats it into "Weekday, Month
Day, Year" (e.g., "Monday, December 10, 2024").

47. Add Days to Date: Write a program that takes a date and a number of days, then adds the given
days to the date.

48. Convert 24-hour to 12-hour format: Convert time from 24-hour format to 12-hour format.
49. Leap Year Calculation: Determine if a given year is a leap year using the datetime module.

50. Days in a Month: Write a program that finds out how many days are there in a particular month
of a particular year.

You might also like