Programming Flashcards
(26 cards)
What does if and else do in a program?
Checks the conditions of a question or it checks the answers.
What is an integer?
A whole number
what is a float?
A decimal number
What is a string?
A piece of text
How many bytes does an integer piece of data use up?
2 bytes or 4 bytes
What is an operator?
Used to assign values or compare 2 values for example
name = input(‘What is your name’)
or
5 == 5 (this evaluates to true)
What is selection?
Where the user or the programme inputs data
What is a Variable?
A piece of data that can change
What is a constant?
A piece of data that can’t change
What is iteration
A programme that can repeat itself
What is a while loop?
When a condition is true, the programme repeats itself
What is an array?
A variable with multiple values
What is a module?
A module is something that you can import into your code such as turtle and datetime
Which comparison operater means “greater than”?
x > y
Which comparison operator means “smaller than”?
x < y
Which comparison operator means “greater than or equal to”
x => y
which module is used to import the date and the time?
import datetime
What is a user defined variable?
A variable where the user chooses the variable
What is a programme defined variable?
A variable where the programme has already chosen it
What is a concatenation?
Where strings are joined together
What is string manipulation?
When the programme can change the string how ever it wants to such as .lower() which makes the letters in a string all lower case
What is arithmetic?
Where the programme can do different calculations
What does the module “turtle” do?
It makes it so the programme can draw stuff
Which comparison operator means equal to?
= or ==