I am new and was playing around but I would like assistances on line 40 to line 58 if possible

Question:

Current behaviour:

Desired behaviour

Repl link:

replit.com/@MaheenAwan1/Stufffffffffffffffffffffffffffffffffffffffffffffffffffffffff#main.py

code snippet

Hey @MaheenAwan1 welcome to the forums!

I see your problem line 40 has a space between the print and the open parenthesis (. Change line 40 to this print("Do you like rabbit?").

5 Likes

Your countdown will enter in an infinite loop without a decrement too.

3 Likes

thank you so much. It really helps.

1 Like

@MaheenAwan1 whichever post helped you the most please mark it as the solution. It can help people with a similar problem in the future.

4 Likes

Sorry how do I do that???

@MaheenAwan1 you are trying to end your loop correct? You will need a counter that decreases through each run through the loop. Your loop will need to detect it with something like this while counter > #number_to_end_on: if it goes to 0 the loop will end, if you want to count up instead of counting down do this while counter < #number_to_end_on. Hope this helps.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.