GoConqr has a new look! Let us know what you think.

Mind map

First Assignment Mental Map

Jeffrey Kolbeins English

Map content

First Assignment Mental Map

  1. Q1: rand.randint(_,_) works by returning a random number between a given range imputed into the function

    • Q2: The random is a module with a set of functions used to return random numbers. The purpose of the the period is to call the random function and then call the specific function in the module to be used.
      • Q3: The purpose of the function print(_) is to print the 5 random numbers that were generated using the rand.randint(start,stop) function in the random module
        • Q4: The purpose of the + operator in the function print is to concatenate or combine two string variables together. In the case of this specific code it was used to combine all of the random numbers generated into one print function.
          • Q5: The purpose of the function str(_) is to convert the random integers generated into a string so they could be printed as "numbers generated
            • Q6: The variable Largest is a local variable because it was created inside the function getLargestRandom(_) meaning that it can only be used in that specific function and not anywhere else
              • Q7: The None in the code means that function came up empty. For example in the function getSmallestRandom it means there is no smallest random number.
                • Q9: In a line of code within a function, the return gives back a data value whether it be an integer, string, float, boolean, etc...The return gives the smallest random generated integer
              • Q8: The inputValue is an argument that is sent through the countGreaterEqualNumbers that counts the number of random numbers generated previously that are greater than or equal to inputValue argument.
                • Q10: Declaring a function generates a function with a name. Defining a function simply tells the computer what to do when the function is called. Calling a function is using a function in your code for some purpose.
                  • Q11: The message function was created by creating a string "Our results are in" and the function is used to print out a string using that string function an if else statements. Those statements are the largest and smallest random number, the number of random numbers above or equal to inputValue, the smallest odd random number generated, and the average of the random generated numbers.

Information

Description
Mind Map on First Assignment Mental Map, created by Jeffrey Kolbeins on 25/01/2021.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?