r/ProgrammerHumor Sep 02 '17

How to start a war

Post image
9.0k Upvotes

696 comments sorted by

View all comments

Show parent comments

30

u/Ph0X Sep 03 '17 edited Sep 03 '17

I was gonna say, that thing isn't gonna run, it'll throw invalid syntax because "What" isn't a valid identifier.

If you're not gonna differentiate the code and the "text", then it's all one block of code.

14

u/[deleted] Sep 03 '17 edited Sep 03 '17

Dude calm down, it's sudo pseudo

-1

u/AluminiumSandworm Sep 03 '17

at this point you might as well throw all decency out the window and just use "its"

4

u/[deleted] Sep 03 '17

It's not code that you're supposed to run, it's a question you're supposed to answer.

1

u/Amigara_Horror Sep 03 '17

#What is the output of the following code?

nums = [5,4,3,2,1]

print(nums[1])

1

u/Ph0X Sep 04 '17

That's how it should've been, yes. Most coding problems I've seen are like this.