Fetch
Decode
Explain
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Login
Menu
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Qualifications
OCR GCSE Computer Science
2.2 Programming Fundamentals
Input
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
Which term describes the message shown on screen that tells the user what to type before the program waits for their entry?
Prompt
Which term describes data typed on the keyboard and read into a program while it is running?
Input
Which term describes the type of value that input() always returns, even when the user types digits?
String
What is meant by the input() function?
It shows a prompt, waits for the user to type and press Enter, then gives back what was typed as a string
What is meant by concatenation?
Joining two or more strings together to make one longer string
Why should a prompt usually end with a space, as in input('Enter your age: ')?
So the user's typing does not run into the prompt text
A program must add a whole number typed by the user to another number. Which line stores the typed value correctly?
Number = int(input('Enter a whole number: '))
A program needs a height in metres, such as 1.67. Which line stores the typed value so it can be used in a calculation?
Height = float(input('Height in metres: '))
The user types 3. What does this program print?
90
A program asks for a first name and a surname, then runs print('Hello ' + firstName + ' ' + surname). The user types Ali then Khan. What is printed?
Hello Ali Khan
A program asks for a length in metres and converts the typed value using int(). A user types the word ten. What happens?
The program stops with an error
A program contains the line input('Enter your name: ') with nothing before it. What is the effect of this line?
The name is read from the keyboard but is not kept for later use
A prompt is on the screen and the user has typed 15 but has not pressed Enter. What is true at this moment?
The program is still waiting and the value is not stored yet
The user types 15. What does this program print?
1515
The user types 4 and then 9. What does this program print?
13
A program needs a height in metres, such as 1.67. Which reason explains why the prompt should mention metres and give an example value?
It tells the user which unit and form to type in