Cooperative Learning Question

On a piece of paper, write your NAME, SECTION and DATE.

In the code below, fill in the blanks so that the flag is True when the user typed at least one number bigger than 5. (if ANY number is bigger than 5)


def main():
        flag = ___(1)______
ANSWER:  False
        for i in range(5):
            n = int(input("Give me a number "))

            if  ____(2)______ > 5:
ANSWER:  n

                    _______(3)____________
ANSWER:  flag = True

        # end of loop

        if _____(4)________:
ANSWER:   flag  (or flag == True)
            print("There was at least one number greater than 5")

        ____(5)_____:
ANSWER:  else
            print("There were no numbers greater than 5")

main()

Use your notes as desired.

Check with your neighbor to see that they all have the right answers.