GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Q1: How does the random.randint(_,_) work?

Austin Ross Englisch

Inhalt der Mindmap

Q1: How does the random.randint(_,_) work?

  1. A1: It works by returning a random integer between (and including) the upper and lower limits.

    • Q2: What is “random” and what is the purpose of using the period (.) before randint?
      • A2: “random” is a module. randint is a method. The period is used to separate them.
        • Q3: What does the function print(_) do in the next line of code?
          • A3: Print will display the content of the parenthesis in the terminal. It will also display the values of the strings.
            • Q4: What is the purpose of the (+) operator in the next line of code?
              • A4: The (+) operator concatenates the strings so they are all displayed as the same sentence.
                • Q5: What is the purpose of the function_str(_) in the next line of code?
                  • A5: The str function casts the variable type into a string so that it can be printed.
                    • Q6: Is the variable (largest) global or local? Why?
                      • A6: Largest is a local variable because it is defined only within the function.
                        • Q7: What does None mean?
                          • A7: None is the absence of value.
                            • Q8: What is inputValue? Why is it necessary for this function?
                              • A8: Input value takes a random number within the range and inputs it to the function.
                                • Q9: What does return do?
                                  • A9: Return leaves the current function and returns a value.
                                    • Q10: What is the difference between declaring, defining, and calling a function?
                                      • A10: Declaring a function makes it exist. Defining a function is how you make it do something. Calling a function makes it execute.
                                        • Q11: How was the variable message built?
                                          • A11: It is concatenated with a string function.

Informationen

Beschreibung
Mindmap am Q1: How does the random.randint(_,_) work?, erstellt von Austin Ross am 25/01/2021.
Erstellt von
Austin Ross
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck