0

Please help me with my code. I do not know why it is not working.

Can someone please help. What's wrong with my code? password = "bots are awesome" ipt = input("enter password:") if ipt == password: print("you got accses to programing website:" + "code.org") else: print("hacker! hacker! hacker! call the police!") I can not get the input part to work.

9th Dec 2016, 12:34 PM
dan
dan - avatar
5 Answers
+ 4
Oddly enough, the code does work although you said it doesn't. The app doesn't process the code like a Python interpreter normally would. Like you have to input everything that you need for your program before it prompts you. So in solo learn, no need to add indications of prompts just place comments.
9th Dec 2016, 1:00 PM
Don
Don - avatar
+ 3
What is the error?
9th Dec 2016, 1:00 PM
Keto Z
Keto Z - avatar
+ 1
nothing wrong but u need to give input in order for ur program to return any output 😑
10th Dec 2016, 5:10 AM
Mr. M
Mr. M - avatar
0
nothing is wrong with your code how can you possibly get an error
10th Dec 2016, 11:34 AM
pythonbee
pythonbee - avatar
0
Dan, in most python IDEs, you should change it to password = "bots are awesome" ipt = raw_input("enter password:") if ipt == password: print("you got accses to programing website:" + "code.org") else: print("hacker! hacker! hacker! call the police!")
4th Feb 2017, 11:55 PM
Isaac Pace
Isaac Pace - avatar