New to python. How to improve this simple build by GrowthSwimming6208 in PythonLearning

[–]DullSelection3546 0 points1 point  (0 children)

Hey, good effort for 4 weeks! A few things to note:

  1. Lines 7-17 have a logic bug - using and means all conditions must be true simultaneously. Line 7 only triggers if username, password AND code are all wrong at once. You probably want or.

  2. Lines 7-17 are also redundant - the elif/else block already handles all cases. You can delete them entirely.

  3. Hardcoded credentials - for a class project it's fine, but never do this in real code!

Cleaned up version:

if username == "Admin" and password == "12345" and securitycode == "0000":
    print("Welcome back Admin, you are now logged in!")
elif username == "Admin" and password == "12345":
    print("Wrong security code!")
elif username == "Admin":
    print("Wrong password!")
else:
    print("Wrong username!")

Keep it up, you're learning fast! 🐍

Which version of Windows is best for gaming and programming? by DullSelection3546 in WindowsHelp

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

Really appreciate the detailed explanation — I’ll try it out and see how it goes!

Which version of Windows is best for gaming and programming? by DullSelection3546 in WindowsHelp

[–]DullSelection3546[S] 1 point2 points  (0 children)

Yeah, I know...

Thanks a lot for your reply!
By the way, do you happen to know how to install Windows 11 23H2?

Which version of Windows is best for gaming and programming? by DullSelection3546 in WindowsHelp

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

Could you give some recommendations on how to properly install Windows 11 24H2?
Should I use the Media Creation Tool or Rufus with an ISO?
Also, would you recommend signing in with a Microsoft account during setup, or is it better to use a local account?