Exercises
- Ask a user how their day is, then output different responses based off the input.
- Ask a user for 2 numbers check if any numbers are even (or odd) and output which numbers are even (or odd).
- Build a program that adds 2 to a number while the number is less than 10 and output the result.
- Create a Calculator that will run until the user enters quit. Ask the user for 2 numbers then have the user enter add, subtract, multiply or divide. Print the answer to the user.
Possible Solutions
Ask a user how their day is, then output different responses based off the input.
- Be creative with your responses
- Try a nested if statement
Ask a user for 2 numbers check if any numbers are even (or odd) and output which numbers are even (or odd).
- Nested if statements
- Separate statements to check each number.
Build a program that prints items from a list.
Create a Calculator that will run until the user enters quit. Ask the user for 2 numbers then have the user enter add, subtract, multiply or divide. Print the answer to the user.