logo CodeStepByStep logo

stars_print

Language/Type: Python expressions %

What output is produced by each of the following code samples?

# A)
for i in range(5):
    for j in range(10):
        print("*", end="")
    print()   # to end the line
# B)
for i in range(1, 6):
    for j in range(i):
        print("*", end="")
    print()
# C)
for i in range(1, 6):
    for j in range(1, i + 1):
        print(i, end="")
    print("")
A)
B)
C)

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.