Mapa mental
CIS4930: First Assignment
Contenido del mapa
CIS4930: First Assignment
How does the random.randint(_,_) work?
- It uses the random number module to draw an integer between the specified values
- What is "random" and what is the purpose of using the period (.) before randint?
- Random is a module in python that was imported, the period indicates you are using the randint method from the random module.
What does the function print(_) do in the next line of code?
- What is the purpose of the (+) operator in the next line of code?
- What is the purpose of the function str(_) in the next line of code?
- The purpose is to represent the variables as strings for printing.
- It concatenates multiple strings and spaces to print.
- What is the purpose of the function str(_) in the next line of code?
- It displays what is specified in the parenthesis to the user when the program is run.
- What is the purpose of the (+) operator in the next line of code?
Is this variable (largest) global or local? Why?
- The variable is local; it is declared and used only within the function.
What does None mean?
- None means there is not currently a value for the variable.
What is inputValue? Why is it necessary for this function?
- InputValue a parameter of the function; it is necessary so you have the value being compared to.
What does return do?
- Return causes the function to retrieve the value specified when called.
What is the difference between declaring, defining, and calling a function?
- Declaring a function only requires you to use the def keyword and name the function as well as any of its parameters, while defining it entails specifying what code the function uses. However, this code is only actually run once the function is called.
How was the variable message built?
- It was built using self-reference and concatenation to add each new response to the message. An if else structure is used to handle that function4 may return None or a value.
Información
- Descripción
- Mapa Mental sobre CIS4930: First Assignment, creado por Blake Hedlund el 21/01/2021.
- Creado por
- Blake Hedlund
- Visitas
- 1
- Valoración