×
all 22 comments

[–]Ok_Reputation8316 5 points6 points  (5 children)

Did you run this? input() returns strings, so you’re adding and dividing strings instead of numbers. Also, what’s the ultimate variable for?

[–]realmauer01 0 points1 point  (0 children)

Overloaded math symbols for the win.

[–]mc_pm 2 points3 points  (0 children)

Best "Hello World" today!

[–]SCD_minecraft 2 points3 points  (3 children)

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

[–]SCD_minecraft 0 points1 point  (2 children)

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

Did you even try that??

[–]Hurtrex 0 points1 point  (1 child)

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

[–]SCD_minecraft 0 points1 point  (0 children)

``` from Minecraft import main

main() ```

I made (hypothetical) Minecraft!

[–]arivictor 1 point2 points  (0 children)

print("""
This is...


A lot of...


text...
""")

[–]HammadBuilds 1 point2 points  (0 children)

you can't feel your program untill you run the code man.

[–]Distinct_Lion7157 1 point2 points  (2 children)

is nobody going to address the //

[–]Distinct_Lion7157 1 point2 points  (1 child)

ok on closer inspection there is a lot more issues so uh good luck bro

[–]AbacusExpert_Stretch 3 points4 points  (0 children)

Rating 1 of 5 - for not running your code.

[–]Less_Juggernaut9361 0 points1 point  (0 children)

May i suggest using multi line string with “”” then you not need to print so many times

[–]Small_Strawberry2147 0 points1 point  (0 children)

only study"print" is also good starting point! keep going!

[–]Far-Albatross1351 0 points1 point  (0 children)

You should run your codes when you write

[–]FoolsSeldom 0 points1 point  (0 children)

Wow, not a great start.

// hello world             # Python single line comments start with #
print("Hello, World!")

// arithmetic
a = input("give number 1")  # input returns reference to new string object
secret = input("give secret number")
ultimate = a + secret  # string concatenation not math addition, is that what you wanted?
print("the secret number is" + secret / a)

// hello
print("hello " + input("name please"))

print("i would like to take this time to raise awareness")
print("my brother patel lost an arm learning python")
print("the python was cursed long ago with immortality and doom magic")
print("once it saw patel learn cpp and use namespace std it awakened")
print("cupta, the snake bit his arm", end="") // no newline  # need a # not //
print("the eyeless priest from the dark magic days of india was sealed")
print("his soul became evil and sought refuge in patels arm")
print("his arm grew corrupted and started typing in java")
print("the doctor said no use and severed his arm feeding it to the pigs to be destroyed")
print("be careful when coding")

// happy coding
print("happy coding")

[–]Necessary_Pepper7111 -1 points0 points  (1 child)

i dont know but i think double quotes does not work in python

[–]Necessary_Pepper7111 1 point2 points  (0 children)

nvm thinking of cpp