Hi,
Here is a basic program to show you how it’s possible to ask to the user something:
- Use your variable = input(« your message »)
- Use « if (condition): » to show an interaction between the program and the user
Comments:
The user input belongs to string type but the user can enter an number. The programmer has to specifies before input the type of the message entered. For example: number1 = int(input( » « ))
Don’t forget the colon after « if » and use some parenthesis to enrolled the condition
Have a good day !
Masteries 15 and 28 by aureliemartinette is licensed under a Creative Commons Attribution 4.0 International License.