logo CodeStepByStep logo

half_the_fun

Language/Type: Python parameters print

What output is produced by the following program?

def half_the_fun(number):
    number = number // 2
    for count in range(1, number + 1):
        print(count, end=" ")
    print()

def main():
    number = 8
    half_the_fun(11)
    half_the_fun(2 - 3 + 2 * 8)
    half_the_fun(number)
    print("number =", number)

main()
line 1
line 2
line 3
line 4

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.