Input and output (Edexcel GCSE Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What data type does the input() function always return in Python?
What data type does the input() function always return in Python?
String (text)
If a user types 42 into an input() function, how is it received by the program?
If a user types 42 into an input() function, how is it received by the program?
As the text "42"
Which function converts string input to a whole number?
Which function converts string input to a whole number?
int()
Which function converts string input to a decimal number?
Which function converts string input to a decimal number?
float()
Why must you convert input data from the input() function?
Why must you convert input data from the input() function?
Input is always text; convert for calculations
What is the purpose of the print() function?
What is the purpose of the print() function?
Display output to user's screen
What happens when you use print() with multiple values separated by commas?
What happens when you use print() with multiple values separated by commas?
Spaces are created between values
What is string concatenation?
What is string concatenation?
Joining text together
What does the .format() method allow you to do?
What does the .format() method allow you to do?
Create output with spacing control
In string formatting, what does the < symbol do?
In string formatting, what does the < symbol do?
Aligns text to the left
In string formatting, what does the > symbol do?
In string formatting, what does the > symbol do?
Aligns text to the right
What does the format {:>5.2f} do in Python?
What does the format {:>5.2f} do in Python?
Right-align, 5 chars wide, 2 decimals
