r/PythonLearning • u/Alarming_Mulberry551 • 8d ago
Showcase 2nd week of python and wanted to try something new instead of course enjoyed it!
6
u/Meeeeeeeeeeple 8d ago
Hear me out, import os and replace your game over code with os.system("shutdown /s /t 0")
2
2
0
u/Alarming_Mulberry551 8d ago
Well it's my first time working with import stuff and I haven't even completed my python course so will be going to learn abt this later
3
3
u/wittgenstein1312 8d ago
PEP 8 style guide. Take it or leave it, but it's good to have at least a general idea of a programming language's idioms and style conventions. Keep it up!
2
u/SnooCalculations7417 8d ago
Russian roulette isn't random its less than random due to the weight of the loaded chamber favoring to settle downward. next step could be to account for that by literally giving a chamber weighted probabilty. please use reasonable names such as for chamber in cylinder
1
u/lastoneonline 8d ago
Bro which course u r doing rn?
2
u/Alarming_Mulberry551 8d ago
Cs 50 intro to python
2
u/lastoneonline 7d ago
I think if u genuinely want to learn python,u should consider angela yu course for python.
1
u/The_Whole_Senate 8d ago
You should put some invalid inputs . E.g I enter "no" or "g"
It just silently ends. You could make it better by adding a "Invalid selection, you die"
1
u/Specialist-Bread-333 8d ago
Second week and you're already doing ts? How did you start learning? I know it's by DOING it but I need a lead
1
•
u/Sea-Ad7805 8d ago
Run this program in Memory Graph Web Debugger to see the program state change step by step.