Kodewick
Start learning →
Starter←→0 / 100

Star rating

#021StarterLoopsStrings2 min

The review page draws each score as stars: a 4 shows ****. Write star_row(n) to build n stars with a loop and return them. For n of 0, return the empty string "".

Examples
star_row(4)→'****'
star_row(1)→'*'
main.py
def star_row(n):
    stars = ""
    for i in range(n):
        # your code here: add one "*" to stars
        pass
    return stars
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.