Python Forum
List and function while and else
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List and function while and else
#4
Just throwing a random break in doesn't fix the problem. Now your loop only executes once, and the else clause never activates.

In the future, please give the full text of all error messages, so I can see where the problem is. If it's on the pyplot.plot statement, it's still going to be a problem after you fix the loop. Your list c is fixed length, while (if your loop is working) d's length depends on user input.

And you are still assigning integers to d.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
List and function while and else - by doug2019 - Oct-08-2019, 06:10 PM
RE: List and function while and else - by doug2019 - Oct-08-2019, 06:49 PM
RE: List and function while and else - by ichabod801 - Oct-08-2019, 07:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I created a function that generate a list but the list is empty in a new .py file mrhopeedu 2 2,326 Oct-12-2019, 08:02 PM
Last Post: mrhopeedu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020