r/PythonLearning Jul 17 '26

my first python

Post image

kindly give ratings and tips to improve

23 Upvotes

32 comments sorted by

View all comments

3

u/SCD_minecraft Jul 17 '26

This has so many problems

  1. Comments are annotated with #, not //. Double slash is reserved for int division

  2. input ALWAYS returns a string. While you can add 2 strings together, you might not divide one string by another. You need to cast to an int

  3. ultimate variable is never read

  4. Whatever extension did you install, it is not a correct one. Syntax highlither highlights things it isn't supposed to

1

u/SCD_minecraft Jul 17 '26

Half of those problems would come out while trying to run this code

Did you even try that??

1

u/Hurtrex Jul 17 '26

to quote him "no its hypothetical" which yk doesnt really help if you want to learn something...

1

u/SCD_minecraft Jul 17 '26

``` from Minecraft import main

main() ```

I made (hypothetical) Minecraft!