Question
IS 352 Exercises Conditional Execution (Python Programming) 1. Ask the user to enter two letters. Report whether the letters are the same. 2. Ask the
IS 352 Exercises Conditional Execution (Python Programming)
1. Ask the user to enter two letters. Report whether the letters are the same.
2. Ask the user for their grade on Homework 1 and report their letter grade (A: 100-90; B: 89-80; C: 79-70; D: 69-60; F: 59-0).
3. Generate a random number. Report the number and whether the number is even or odd.
4. Ask the user to enter two words (you will need to prompts) and tell them which word comes first (e.g., cat comes before dog)
5. Ask the user to enter a letter and tell them if it is a consonant or a vowel (Vowels: A, E, I, O, U)
6. Generate 3 random numbers between 1 and 10 and ask the user to guess 3 numbers. Report how many numbers they guessed correctly.
7. Generate a random number and ask the user to guess it. Give the user two tries.
8. Prompt the user to enter their username and password. If their username matches Student, prompt them to enter their password. Otherwise, print a User not found error. If their password matches Greyhounds, print a statement indicating a password match. Otherwise print an Incorrect password error.
9. Ask the user to enter their height (inches) and weight (pounds) and report their BMI and the appropriate classification (BMI = 703 * (weight / (height * height)); Underweight = <18.5; Normal weight = 18.524.9; Overweight = 2529.9; Obesity = BMI of 30 or greater).
10. Write a program that asks a user for their birth year and tells them the Chinese animal associated with their birth (0 = Monkey; 1 = Rooster; 2 = Dog; 3 = Pig; 4 = Rat; 5 = Ox; 6 = Tiger; 7 = Rabbit; 8 = Dragon; 9 = Snake; 10 = Horse; 11 = Goat). You will need to use the modulo operator (%). This operator finds the remainder after dividing two numbers (e.g. 1930 % 12 = 10 Horse). More info: https://www.chinahighlights.com/travelguide/chinese-zodiac/
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started