

Summer Lesson 04
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Robert Giordano
Used 1+ times
FREE Resource
5 Slides • 3 Questions
1
Lesson 04
User Input
2
Usability
One of the things that makes programs good is their
usability. If the user cannot interact with a program,
they are unlikely to use it. So it’s important for us as
programmers to make sure that our programs can
include the user in it’s operation.
We do this by taking user input
3
User Input
Python has an easy to use input command. The main
thing to understand is that you need to make sure that
there is a variable to store the value that the user
inputs.
The format is:
variable = input(PROMPT)
In the console whatever you typed as the PROMPT will
be printed and the console will wait for the user to
input a value. Once they input a value, the variable will
hold the value they enter.
4
Drag and Drop
5
Example:
In this example the variable userNum will receive the
value that the user enters.
Now we can see that the number the user enters is
printed.
6
Fill in the Blanks
Fill in the blank to complete the code:
name =
7
Data Type of Input
We can check the data type of the input data to see
how it is being stored.
Here we can see that when we input a value, it is
stored as a String (str). If we want to use that value
later in a calculation it will have to be type cast to a
numeric data type.
8
Fill in the Blanks
Fill in the blank to take in an integer from the user:
num = ___(_____("Enter an integer: "))
Lesson 04
User Input
Show answer
Auto Play
Slide 1 / 8
SLIDE
Similar Resources on Wayground
7 questions
JavaScript Function Review
Presentation
•
9th - 12th Grade
7 questions
MATERI INFORMATIKA 7
Presentation
•
KG - 12th Grade
7 questions
03.02 Browser
Presentation
•
9th - 12th Grade
7 questions
Pelatihan FPD
Presentation
•
KG
6 questions
Consumer Rights and Responsibilities
Presentation
•
9th - 12th Grade
3 questions
8) Protecting Data Part 1
Presentation
•
9th - 12th Grade
7 questions
Mechanical vs. Electromagnetic Waves Vocab Building
Presentation
•
9th - 12th Grade
7 questions
1.1 Getting to Know Excel
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade