Python runs in the reader's browser (Pyodide): no server is needed, input() asks while the program runs, and a guest can run it too.
name = input("Your name: ")
age = int(input("Your age: "))
for year in range(1, 4):
print(f"{name} in {year} year(s): {age + year}")
Student
- Click Run and answer the two questions in the console.
- The first run loads Python (a few seconds); the next ones start at once.
Teacher
- Nothing to set for Python. The browser needs Chrome or Edge 137 or newer; other browsers run Python on the server.