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

Program 11

Uploaded by

Abhisar kumar
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)
12 views2 pages

Program 11

Uploaded by

Abhisar kumar
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/ 2

1.

Write a program that asks the user for a number and


determines whether it is odd or even. Display an appropriate
message.
2. Create a program that prompts the user to enter a score (0-
100) and evaluates the grade based on the following scale A
(90-100), B (80-89), C (70-79), D (60-69), F(0-59). Print the
corresponding grade.
3. Design a program that asks the user for their age and prints a
message indicating whether they are a minor (under 18) or an
adult (18 and older).
4. Write a program that asks the user to input a single letter and
checks whether it is a vowel or a consonant. Display an
appropriate message.
5. Develop a program that takes a number from the user and
checks if it is positive, negative, or zero. Print the result.
6. Create a program that prompts the user for a year and
determines whether it is a leap year. A year is a leap year if it
is divisible by 4, but not divisible by 100, except when it is also
divisible by 400.
7. Write a program that asks the user to input a temperature in
Celsius and checks whether it is freezing (below 0°C), mild
(0°C to 30°C), or hot (above 30°C). Print a message according
to the temperature range.
8. Create a simple calculator program that takes two numbers
and an operation (addition, subtraction, multiplication, or
division) from the user. Perform the calculation and display
the result. Handle division by zero appropriately.
9. Write a program that prompts the user to enter a number and
checks if it is a prime number. A prime number is only
divisible by 1 and itself. Display an appropriate message.
10. Design a program that asks the user to input the current
weather condition (sunny, rainy, or snowy) and prints a
corresponding message about what to do or expect based on
the weather.

You might also like