Bambarbiakirgudu
Regular Member
- Nov 9, 2016
- 358
- 63
Guys, i m shy to say that, but i couldn' get this simple python code working although everything looks fine.
code
# -*- coding: utf-8 -*-
print("E-mail service:")
user_name = input("User name:")
pw = input("Your password:")
if user name == "asdf" and pw == "123456":
print("Welcome!")
else:
print("Wrong user name or password!")
code
Where m i doing wrong? it seems if block doesn't work, but directly goas twoards "else" case after i fill user name and password regardless to what i input.
How will i correct this?
code
# -*- coding: utf-8 -*-
print("E-mail service:")
user_name = input("User name:")
pw = input("Your password:")
if user name == "asdf" and pw == "123456":
print("Welcome!")
else:
print("Wrong user name or password!")
code
Where m i doing wrong? it seems if block doesn't work, but directly goas twoards "else" case after i fill user name and password regardless to what i input.
How will i correct this?