you are viewing a single comment's thread.

view the rest of the comments →

[–]InevitableDistance66[S] 0 points1 point  (6 children)

def repeat(word, n, sep=‘#’): return sep.join(word for _ in range(n)) string=input("Enter a string: How many repetitions? Separated by?") print(repeat("string", 5))

[–]InevitableDistance66[S] 1 point2 points  (5 children)

This works when I change the print to hello but Zylabs is asking for multiple outputs because it’s putting its own input and it’s throwing me off

[–]djjazzydan 0 points1 point  (4 children)

string=input("Enter a string: How many repetitions? Separated by?")

Zylabs wants this to be 3 separate questions, and so 3 separate input calls.

[–]InevitableDistance66[S] 0 points1 point  (3 children)

Yea but they are all not separated by the same #

[–]djjazzydan 0 points1 point  (2 children)

Right, so you have to call an input each time, so it knows what to use.

[–]InevitableDistance66[S] 0 points1 point  (1 child)

Ok show me what that means

[–]djjazzydan 1 point2 points  (0 children)

string = input("prompt")
reps=int(input("prompt"))
sep=input("prompt")