Python Forum
i making a terminal sign up website thing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i making a terminal sign up website thing
#2
Please use bbcode tags for your python code (you can press the python button above the editor).

(Nov-04-2021, 03:15 AM)Kenrichppython Wrote:
if YesNo == f:

This code checks if the variable YesNo has the same value as the variable f. But since you haven't assigned to the variable f yet, this is an error. I suspect you wanted to check if it was the string f. If so, you need to use quotes to define the string.

if YesNo == "f":
It is also a good idea not to use the same name for both a function and a variable in the function. Because they have different scope, this won't break immediately. But there are situations where this would cause confusion. Better to pick different names:

def username():
    username = input("username:") #username used as function name and string name
    ...
Reply


Messages In This Thread
RE: i making a terminal sign up website thing - by bowlofred - Nov-04-2021, 03:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Does @ at sign used for tother than decorators? ggpython000 1 549 Oct-12-2023, 09:08 AM
Last Post: buran
  I am confused with the key and value thing james1019 3 975 Feb-22-2023, 10:43 PM
Last Post: deanhystad
  Need help i just started the whole thing gabriel789 16 3,230 Sep-12-2022, 08:04 PM
Last Post: snippsat
  Need to sign JWT token with JWK key stucoder 1 1,695 Feb-21-2022, 09:04 AM
Last Post: stucoder
  use thing before self sylvanas 3 2,351 Jul-21-2021, 04:54 PM
Last Post: sylvanas
  Style question on adherence to PEP 8 with whitespace near an "=" sign nilesh 6 3,964 Jan-12-2021, 11:11 PM
Last Post: snippsat
  Not able to make a specific thing pause in pygame cooImanreebro 4 3,229 Dec-13-2020, 10:34 PM
Last Post: cooImanreebro
  Syntax Error with = sign and more Kathleen57 3 2,666 May-03-2020, 03:52 AM
Last Post: buran
  Help with list thing please Yeyzon 1 2,061 Apr-19-2019, 07:51 AM
Last Post: snippsat
  Handling pound sign (#) within custom URL chisox721 5 6,573 Apr-02-2019, 10:01 PM
Last Post: chisox721

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020