+ 1
Why its showing error ?
print("Enter Password\n\n") psw = input(":") if (psw == "lol"): print("acces granted") else: print("get lost intruder")
4 odpowiedzi
+ 4
What about indentation. Keep it in mind just like another languages uses () for logic and {} for codes. In python indentation and : are used . It will be correct as \/
print("Enter Password\n\n")
psw = input(":")
if psw == "lol":
print("acces granted")
else:
print("get lost intruder")
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 , I am saying you that don't write the code which is violating PEP-8 standard. Your code is correct but it is violating pep standard.
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ok
- 2
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Your code is violating PEP-8. One or more statement in single line.
Run below code and check the output for line 27.
https://code.sololearn.com/cktxB2CQLNJr/?ref=app