Mapa mental
firstAssignment.py
Contenido del mapa
firstAssignment.py
Random
- random.randint(_,_)
- Returns a random value between A and B. For ranNumA - a random number between 1 and 100 will be returned.
- The period before "randint" calls methods and attributes of the object stated. They are how you access information within an object.
- Random is something chosen without a distinct method
- random.randint(_,_)
Functions
- Print(_)
- prints the text and numerals in the quotations out on one line of text.
- Operators
- (+)
- addition; combines the terms in that specific order.
- (+)
- Str(_)
- output is the string version of the object.
- Print(_)
Variables: Local and Global
- Local
- declared inside the function.
- ex: largest
- ex: count
- ex: smallest
- declared inside the function.
- Global
- ex: randomNumberA-E
- None
- no value at all or null
- Declaring a variable for a function specifies the parameters of that function.
- Defining a function is using the def keyword and outlining its tasks. It must include a return statement at the end.
- Calling a function is executing with its parameters. It displays anything defined in the function.
- The variable message was built using (+) operator, written text, functions, next line(/n).
- Local
Parameters
- RandomInput
- Is necessary because we are comparing our random numbers to that value.
- A value that gets passed into the function.
- RandomInput
Return Statements
- return smallestOdd
- the last, final step of a function. it prints a value that was used in the function.
Información
- Descripción
- Computer Science Mapa Mental sobre firstAssignment.py, creado por Jovain Sterling el 03/09/2021.
- Creado por
- Jovain Sterling · sep 2021
- Actualizado
- 4 sep 2021
- Visitas
- 0
- Valoración