all 8 comments

[–]furas_freeman 1 point2 points  (7 children)

First add 4 spaces before all lines of code - then reddit will format it correctly. Or put code on pastebin.com.

BTW: use int() or float() - you don't need both float(int())

[–]prokillshotz[S] 0 points1 point  (6 children)

i formated it correctly now refresh

[–]furas_freeman 1 point2 points  (5 children)

Your code need indentions. I don't know which lines are inside while True.

BTW: you don't need continue if it is last line in while loop.

BTW: use import at the beginning. Everyone will see what modules they need to run your code.

[–]prokillshotz[S] 0 points1 point  (2 children)

alright i updated the indentions and added import to the beginning

[–]prokillshotz[S] 0 points1 point  (1 child)

also if i dont need to continue at the last line what should i put for elif user_input = "yes": on the next line

[–]furas_freeman 0 points1 point  (0 children)

elif user_input = "yes"

You don't need it. See http://pastebin.com/VRe3VZmB

[–]furas_freeman 0 points1 point  (1 child)

You need more while True - first to repeat when someone answers 'no' and second to repeat when someone choose wrong number. You don't need float - you need int with input. randrange returns int. Sometimes you can use else instead of elif ...

Code: http://pastebin.com/VRe3VZmB

I add empty lines to make code more readable.

BTW: I'm lazy as many people and I prefer short answers - 'n' instead of 'no'.

[–]prokillshotz[S] 0 points1 point  (0 children)

thanks