Programming Flashcards
(21 cards)
What is an algorithm?
A precise set of instructions to complete a task.
What is a sequence?
A set of step by step instructions.
What is iteration?
Repeating - a line of code can repeat several times.
What is selection?
If statements test to see if a condition is met and react to that.
What is a variable?
Storage location to store data that can then change. Score = 0
What is a program?
A series of step by step instructions that tell a computer how to solve a task.
What is print?
A function that allows you to display information to the user. Eg print(“Hello”)
What is an if statement?
Tests to see if something meets a condition. Eg If password == “1234”
What is an else statement?
Runs if a condition is not met.
What do you do if you want to enter a number?
Int(input(“enter a number”))
What data type is “hello world” an example of?
String
What data type is 90 an example of?
An integer
What data type is 9.5 an example of?
Float
What data type is true an example of?
Boolean
What does == mean?
Equal to
What does > mean?
Greater than
What does < mean?
Smaller than
What does >= mean?
Greater than or equal to
What does <= mean?
Less than or equal to
How would you print hello Emily?
print(“Hello Emily”)
How would you make it so a user input is needed for a variable?
variable = input(“…”)