Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

13. What is sales promotion? Why is it used?

Answered: 1 week ago