Assignment 16 — simple conditional analysis
Due Friday, October 19
Program do_you_relate.py
Produce a program that prompts for two integers and reports the relationship between them.
- If the first input is less than the second input, the program displays
'less than'
- If the first input is equal to the second input, the program displays
'equal to'
- If the first input is greater than the second input, the program displays
'greater than'
- The only program output besides the prompt is the relationship between the two input values.
- Three sample runs
Enter two numbers: 0 0equal to
Enter two numbers: -3 -7greater than
Enter two numbers: 7 12less than
© 2019 Jim Cohoon | Resources from previous semesters are available. |