You will learn to:
print() to display outputinput() to get user inputGo to the official Python website: https://www.python.org/downloads
Download the latest version and, on Windows, check "Add Python to PATH".
Check installation :
python --version
programm.pyprint() – Display Textprint("Hello World")
print(5 + 3)
Explanation:
print() lets you display values to check what’s happeninginput() – User Inputname = input("What is your name?")
print("Hello,", name)
Explanation:
input() shows a message and waits for the user to type somethingnameprint() can then display the input or process it further# Single-line comment
'''
Multi-line
comment
'''
Explanation:
#''' gesetztname = input("What is your name?")
alter = int(input("How old are you?"))
print("Hello,", name + "!")
print("You are", alter, "years old")
Explanation:
int() converts text input into a number so you can calculate or compareWhat is your name? Max
What is your favorite movie? The Matrix
Hello Max! Your favorite movie is The Matrix