Katarzyna Mazur
Katarzyna Mazur
KPCKevin Powell - Community
Created by Katarzyna Mazur on 10/4/2023 in #back-end
How to store an if statement in a variable in Python
Is there a way to store an if statement in a variable that I can then print to the screen? It's an if statement with one elif and else- it's keeping scores in a game and prints who won with print statements but I need to print it using pygame font library to the screen. So, I only need the outcome of the if statement to be printed, so I thought storing it in a variable could help, but I'm having a problem figuring out how to do it.
5 replies
KPCKevin Powell - Community
Created by Katarzyna Mazur on 9/15/2023 in #back-end
Tk Deprecation Warning
Hello, I am starting to learn Python and while trying to do a turtle drawing exercise, I got a warning: DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. The code doesn't run. I am working in VS Code on MacBook Air, and I have Python 3.9.6 installed. Any help would be greatly appreciated.
1 replies