+ 3

New, want input.

It's not much but since i started yesterday im proud of myself. just wanted to know what you'd have done differently. who = input("Who are you?") ui = input("what is the password?") Pass = "Bean123" if ui != Pass: print("You have been denied access!") else: print("Welcome," + who + '!')

10th Apr 2017, 3:50 PM
Kody Noe
Kody Noe - avatar
4 Answers
+ 11
# Perhaps with more descriptive var names, and with var initializations all at topmost if possible. password = "Bean123" name = input("Who are you?") user_pass = input("what is the password?") if user_pass != password: print("You have been denied access!") else: print("Welcome," + name + '!') # Still, if you just started yesterday, this is a very, very great start...
10th Apr 2017, 4:02 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
good job man.. keep it up
10th Apr 2017, 4:02 PM
LordHill
LordHill - avatar
+ 1
ive dabbled a little in a bit of everything over the past year. i made a rock paper scissors game on codecademy but never completed it. never used python though. :) ive worked up to through booleans i think is where i am here on sololearn.
10th Apr 2017, 4:11 PM
Kody Noe
Kody Noe - avatar
0
ive come a long way holy shit.
31st Oct 2017, 5:31 AM
Kody Noe
Kody Noe - avatar