Course 4
Course 4
Entries :
The input() function allows the user to input data using keyboard and to assign it to variables.
We use input():
Remark:
The data entered by the input function is a string type. If you want to obtain a number (and not a
string), you will have to convert or cast these data into an integer or float.
Output :
print() function aims to display values or messages on the screen.
This function can be used in a program to include a message followed by the result or just the
result in the parentheses.
If we display a variable, its value is displayed.
Note: The characters and numbers displayed in bold represent the numbers entered by the user on the
keyboard.