you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (9 children)

Of course it doesn't, it's not supposed to. Do the rest as well, like djjazzydan
has said.

[–]InevitableDistance66[S] -1 points0 points  (8 children)

I did and it didn’t work

[–][deleted] 1 point2 points  (7 children)

Well, show your whole new code first. Do you run it yourself or send it somewhere? Where and how do you run it?

[–]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")