Input and output (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
What data type does input() always return?
What data type does input() always return?
A string (text)
Input in programming
Input in programming
Getting information from users
Output in programming
Output in programming
Showing results back to users
int() function purpose
int() function purpose
Converts string to whole number
float() function purpose
float() function purpose
Converts string to decimal number
print() function purpose
print() function purpose
Displays output on screen
str() function purpose
str() function purpose
Converts numbers to text
String concatenation
String concatenation
Joining text together
.format() method purpose
.format() method purpose
Creates customised output with precise spacing & alignment
< symbol in formatting
< symbol in formatting
Aligns text to the left
symbol in formatting
symbol in formatting
Aligns text to the right
^ symbol in formatting
^ symbol in formatting
Centres text
{:>5.2f} format meaning
{:>5.2f} format meaning
2 decimal places, 5 chars wide, right-aligned
