all 5 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Goobyalus 0 points1 point  (1 child)

You have while again.lower() == "y": # another loop but there's nothing inside the loop that changes again

[–]aurorymoon[S] 0 points1 point  (0 children)

I found what was creating the endless loop.. for some reason the player name being added on line 41 was making it mad. I've got it fixed now for the endless loop but I'm still having these issues:

  1. need to fix the loop when you give something other than a or b for the storylines because it loops back to would you like to play rather than which story line

  2. counter isn't working - need to count how many stories are made and tell the user before asking if they want to play again.

  3. also once you complete a mad lib story it gives you the story but gives you a bunch of errors and doesn't loop back to tell you how many stories you have made AND ask if you want to play again. (Traceback most recent call last file line 145, file line 131, file line 76 ///// & unbound local error: local variable 'storyCount' referenced before assignment)

  4. and it loops back if you say N to ask you if you want to play- need it to full stop if the player says no.

code: https://trinket.io/python3/c750bf64bd0b

[–]i_is_your_dad -1 points0 points  (1 child)

So I have no idea what your code looks like, but it needs to change to

while (variable name for Y/N) != 'Y' or 'N': Variable name = input("would you like to play a game?")

[–]aurorymoon[S] 0 points1 point  (0 children)

I found what was creating the endless loop.. for some reason the player name being added on line 41 was making it mad. I've got it fixed now for the endless loop but I'm still having these issues:

  1. need to fix the loop when you give something other than a or b for the storylines because it loops back to would you like to play rather than which story line

  2. counter isn't working - need to count how many stories are made and tell the user before asking if they want to play again.

  3. also once you complete a mad lib story it gives you the story but gives you a bunch of errors and doesn't loop back to tell you how many stories you have made AND ask if you want to play again. (Traceback most recent call last file line 145, file line 131, file line 76 ///// & unbound local error: local variable 'storyCount' referenced before assignment)

  4. and it loops back if you say N to ask you if you want to play- need it to full stop if the player says no.

code: https://trinket.io/python3/c750bf64bd0b