Apuntes
GCSE-Coding - created from Mind Map
Contenido del apunte (1)
Página 1
Function
If and Else Statments
variables
Inputs and Prints
Importing
Using #
Lists
OR: Statements
:
Def
Defining the function
The you type a basic imput/print
You can then imput a if and else statement
If statements allow the user to input the option that they want to do.
Else Statements allow the user for example restart the program
Variables allow you to store information that the user types in. It can only hold one item of data
inputs allows the user to input there answer to a question/list
When you import things for example sys and time
Importig sys allows you to exit the running program
When you use the # what happens is that you can comment on your coding work that you do to add in important information.
So you can Have/make shopping lists in code
You can also randomly pick an item from a list.
If you use the or statements you would be able to use the if and else statements even better.
if a == 'yes' or a =='y' or a =='YES' or a =='Y':
This statement would allow the user to enter yes in different ways
: represent what goes inside of for example function.
def english():
print('Please type the paragraph you want to look over: ')
main body
call the function by doing
english()
Información
- Descripción
- YouTube Apunte sobre GCSE-Coding - created from Mind Map, creado por Diamond YT el 14/06/2018.
- Creado por
- Diamond YT
- Visitas
- 0
- Historial
-
- Creado por Diamond YT · 14 jun 2018
- Copiado a Apunte por Diamond YT · 14 jun 2018
- Valoración