Python Forum
What's wrong with my code and visuals for python? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: What's wrong with my code and visuals for python? (/thread-9005.html)



What's wrong with my code and visuals for python? - beginnercoder04 - Mar-16-2018

Hi,

I'm new to coding and I am making a math game for a school project.

1) I have one last line of code that has an error but I can't figure out what the error is?
Here is the code:

if percent > 90 (
'Awesome job!! You really know your times tables! '
'You got ', percent ,'' correct.')

It would be awesome if someone can tell me how to fix it!

2) I also need to add visuals to make a functioning game. Does anyone know how to do it on a Mac or Using Xcode? Or could you recommend some programs I can use that are beginner friendly to create a functioning game in Python?

Thank you so much! Please reply ASAP if you can Big Grin I really appreciate it!


RE: What's wrong with my code and visuals for python? - Larz60+ - Mar-17-2018

  • : after if percent > 90, not open parenthesis
  • you forgot print statement before 'Awesome job!! You really know your times tables!'
visuals is a whole learning experience in itself.
Since you are writing a game, I'd recommend using PyGame for the entire application,
Toy will find a complete 8 part tutorial starting here: https://python-forum.io/Thread-PyGame-Creating-a-window-part-1
created by our own Metulburr


RE: What's wrong with my code and visuals for python? - beginnercoder04 - Mar-17-2018

Thank you so much! I appreciate it :)