Mind map
Assignment 1 questions
Map content
Assignment 1 questions
Q2: Random is a python module, the period is used to signify we are calling a function from the "random" module.
Q1: The random.randint(_,_) function takes two integers as parameters and returns a random number between the two of them.
Q3: The print() function prints the information within the parenthesis to the screen.
Q4: The "+" operator concatonates the information inside the parenthesis so that it all prints together.
Q5: The str() function converts numbers into strings.
Q6: The "largest" variable is local to the getLargestRandom() function.
Q7: None is used to describe a null value. It is similar to 0 or "empty string" depending on the variable's datatype
Q8: "inputValue" is a parameter for the "countGreaterEqualNumbers()" fucntion. It is needed as the comparison value for this function.
Q9: "return" returns the the return value back to the process that called the function.
Q10: Declaring a function only alerts the compiler of its existence within the program. Defining a function outlines what the function will do. Calling a function will cause the function to execute, carrying out whatever it is meant to do.
Q11: "message" is built by concatonating the strings that contain information gathered by calling the numerous functions in the program.
Information
- Description
- Mind Map on Assignment 1 questions, created by Austin Kuyrkendall on 24/01/2021.
- Created by
- Austin Kuyrkendall · Jan 2021
- Updated
- Jan 25, 2021
- Views
- 0
- Rating