Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What Is this Error?
#1
I have been working on a little graphics presentation using Python that has a ball that bounces up and down using while loops and timers. But for some reason this error message keeps coming up for my MAX_HEIGHT variable. Does anyone have an idea about what's happening here or what I need to change?
Yoriz write Mar-04-2023, 01:05 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Attached Files

Thumbnail(s)
               
Reply
#2
Please don't post images. Post your code and error messages in tags. (insert python, insert output)
ndc85430 likes this post
Reply
#3
The error has nothing to do with the MAX_HEIGHT variable. ball.get_y() is a function call. You cannot assign a value to a function call.
Reply
#4
In if statement you want comparison ==, not assignment =
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
(Mar-03-2023, 09:17 PM)Axel_Erfurt Wrote: Please don't post images. Post your code and error messages in tags. (insert python, insert output)

Thanks for letting me know.
Reply
#6
(Mar-04-2023, 04:53 AM)buran Wrote: In if statement you want comparison ==, not assignment =

Thanks
Reply


Forum Jump:

User Panel Messages

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