Fichas
Sin título
Fichas del conjunto (17)
- 1what code is needed to print text ?print("example")
- 2what is Sequence?putting instructions in the right order to make things happen.
For example; “Enter username; Enter password; Check details” - 3what is Selection?using conditions to control the flow of a program. For example; “IF username = “Sam” and password = “1234” THEN display welcome message ELSE display error message”.
- 4what is Repetition?ability to execute sequence of instructions many times based on a condition. For example; “WHILE username or password incorrect DO ask for username and password”.
- 5how do you do maths using variables?+ =addition
- = subtraction
* =multiplication
/ =division - 6what's a variable ?A Variable is a value held in RAM that can change whilst the program is running
- 7what's a constant ?A constant is a value that does not change whilst the program is running and is set when the program is designed
- 8what's an assignment ?Assignment is giving a variable or constant a value
- 9what happens you put this into idle userAge = input (“What is your age? “) print (“Your age is “ + userAge)?e,g is 7 - your age is seven -
- 10what are the symbols used in python ?== Equal to
!= Not equal to(also use <>)
< Less than
> Greater than
>= Greater than or equal to
<= Less than or equal to - 11what's a if statement ?entry-level conditional loop
- 12what's a elif statement ?The Elif statement in Python is an extension of the if statement where additional conditions are specified.
- 13what's a list ?A list is a way we can store multiple items of data under the same identifier name.
- 14how many items of data can a variable hold ?A variable holds a single item of data under an identifier name
- 15how many items of data can a list hold?A list can hold MULTIPLE items of data under a single identifier name
- 16what symbol is needed to define a list ?When you define a list items of data are separated by commas or you can define an empty list.
colours = [ ] - 17—
Información
- Descripción
- Fichas sobre Sin título, creado por Ameen Ali el 14/06/2022.
- Creado por
- Ameen Ali
- Visitas
- 3
- Valoración