Concept: user input
input()
get information from users with input()
the input() function prompts the user to supply data returning that data as a string
Example
review and run code - enter a small integer in the text box
print("enter a small int: ")
small_int = input()
print("small int: ")
print(small_int)
Task 1
storing input in a variable
[ ] create code to store input in student_name variable
an input box should when run
[ ] type a name in the input box and press Enter
[ ] determine the type() of student_name
[ ] get input for the variable student_name
[ ] determine the type of student_name
Task 1 continued...
note: input() returns a string (type = str) regardless of entry
if a string is entered input() returns a string
if a number is entered input() returns a string
[ ] determine the type() of input below by entering
a name
an integer (whole number no decimal)
a float a number with a decimal point
[ ] run cell several times entering a name a int number and a float number after adding code below
print("enter a name or number")
test_input = input()
[ ] insert code below to check the type of test_input
На этой странице сайта вы можете посмотреть видео онлайн user input - Introduction to Python: Absolute Beginner Module 1 Video 15 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Book Simplifiers 24 Июль 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 39 раз и оно понравилось 3 зрителям. Приятного просмотра!