programming Flashcards
what is an input?
when a user types in data
what is an output?
when data is outputted from the program
what does print do?
it outputs data for the user to see when running the program
what is a variable?
a piece of data that is saved in the program
what data type is string?
string is a data type saved as text
what data type is integer?
integer is a data type saved as a whole number
what data type is boolean?
boolean is a data type saved as true or false
what data type is float/real?
float/real is a data type saved as a decimal number
what data type is character?
character is a data type saved as a single letter/ string
what does if else do in a program?
it gives a condition so if it is met then it will do something and the same if it is not met
what is iteration?
a loop
what is definite iteration?
a loop that will happen continuously
what is indefinite iteration?
a loop that ends and only goes on for so long
why do loops make programs more efficient?
as it lowers the amount of code that needs to be written
what is authentication?
confirming that something is true or real
what is while in python used for?
while is used to execute a block of code when the condition is true
why is elif used in if…else?
to give multiple conditions
what does this code do?
for i in range(4):
turtle.forward(100)
turtle.right(90)
it draws a square
what happens in the shell window?
i is where all the outputs from the program appear and where the user can input data into the program
what does an index for a string do?
it marks the position of each of the characters and gives them a number to remember this position