User Input - Python for Absolute Beginners

Опубликовано: 12 Апрель 2022
на канале: Programming With Nick
615
28

Most programs are designed to solve a problem the user faces, so we usually need to get information from the user to achieve that. In this video, we are going to learn how to get user input, the first step to making our programs interactive.

To get input from the user we use the input() command. The input command pauses the program and waits until the user enters some text.

For example, let’s try the following two commands:
name = input(“What is your name? ”)
print(f“Hello, {name})