filmov
tv
Python Final Exam Practice Question Part 1 - Q1 to Q5

Показать описание
Q1: Write a program function to Calculate the sum 1+3+5+7+9+11+….+N. Number N should be taken from the keyboard
Q.2) Write a program to check year is a leap year or no
Q.3) Write a program to display all the prime numbers within 1 to 100.
Q.4) Take a number from the keyboard. Write a program to check whether a number is prime or not. If the number is prime, then print the message “Coffee of Starbuck is good” else print “Coffee of Dunkin Donuts is good”
Q.5) Write a program to obtain all the odd numbers from the given list of multiple numbers. The number should be given through the keyboard.
Q.2) Write a program to check year is a leap year or no
Q.3) Write a program to display all the prime numbers within 1 to 100.
Q.4) Take a number from the keyboard. Write a program to check whether a number is prime or not. If the number is prime, then print the message “Coffee of Starbuck is good” else print “Coffee of Dunkin Donuts is good”
Q.5) Write a program to obtain all the odd numbers from the given list of multiple numbers. The number should be given through the keyboard.