Fetch
Decode
Explain
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Login
Menu
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Qualifications
KS3 Computing
Python Programming
Input Function
Card
1
of
16
0
got it
0
still learning
Question
Evil question
Tap
Click or press space
to see the answer
Answer
Still learning
Got it
Turn over
Shuffle
0%
Round complete
Go again with the ones I'm still learning
Start the whole set again
Choose another set
All 16 cards in this set
What is meant by input in a Python program?
Data that a program receives from the user while it is running
Which term describes the text inside the brackets of input() that is shown to the user before they type?
Prompt
What is meant by a variable in a Python program?
A named store that holds a value so it can be used later
What is meant by a function in a Python program?
A named block of code that performs a job when it is called
Which term describes the pair of symbols that must surround the question inside input()?
Quotation marks
In the line name = input('What is your name? '), which part is the function that gets data from the user?
The word input
What happens to the user's answer if it is not stored in a variable?
The answer is lost and cannot be used later
Which line correctly asks the user for their name and keeps the answer?
Name = input('What is your name? ')
When is the text inside the brackets of input() shown on the screen?
Before the user types their answer
A program runs age = input('How old are you? ') and the user types 12. What does age hold?
The text 12
A programmer wants the user's score saved as a whole number. Which line should they use?
Score = int(input('What is the score? '))
Why do programmers often put a space at the end of the prompt text?
So the typed answer does not touch the question
The user types Sam when this program runs. What is shown?
The program shows Hello, Sam
A program asks for a name and an age and then prints both in one sentence. What must the programmer do with the two answers?
Store each answer in its own variable
A program sets score = 10 in its code. A second program uses score = input('What is the score? '). Why is the second program more useful?
It can use a different score each time it runs
A student writes name = input('What is your name? ) and runs the program. What is wrong with the line?
The prompt text is missing its closing quotation mark