Mapa mental
Assignment 1
Contenido del mapa
Assignment 1
Random
- Q1
- random.randint(a,b) returns a random integer between a and b inclusive
- Q2
- "Random" is a module that was imported at the beginning. The purpose of the "." is to show that you want to use the method "randint" that is a part of the "random" module
- Q1
Print and Strings
- Q3
- The print( ) function prints out its input.
- Q4
- The + concatenates the strings together to form a continuous string
- Q5
- The str( ) function takes in an int as an input and outputs a string that has the same number.
- Q11
- The variable message was built by concatenating other strings and function outputs to itself multiple times
- Q3
Variables
- Q6
- The variable is local, as it is declared in a function defnition
- Q7
- "None" is a way of assigning a null or default value to a variable, no matter the data type it will eventually be
- Q6
Functions
- Q8
- inputValue is the parameter of the function. It is important because it provides what value to compare to.
- Q9
- "return" breaks out of the function and returns whatever is after it as the function's output
- Q10
- Declaring a function includes stating the function exists and includes important information like its name and parameters
- Defining a function includes the code and instructions that it will carry out.
- Calling a function actually carries out and preforms the function in run-time.
- Q8
Información
- Descripción
- Mapa Mental sobre Assignment 1, creado por Nick Kapsos el 29/08/2021.
- Creado por
- Nick Kapsos
- Visitas
- 0
- Valoración