Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Code
#1
Exclamation 
name1 = input('Please enter your name:  ')     
if name1 == str (anees) or str (clow) :
    print( 'Authentication Success, You are allowed to enter the premises ' )
else :
    print('Access not allowed')

# code to show who is allowed and who is not allowed to enter the premises #

When I run the code , its throwing error as name1 not defined . Please help

I am beginner to python coding, Please do help and rectify the code
Yoriz write May-23-2021, 09:19 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
New Code - by r_anees - May-23-2021, 06:02 AM
RE: New Code - by qomiter - May-23-2021, 06:25 AM
RE: New Code - by bowlofred - May-23-2021, 06:59 AM
RE: New Code - by knight2000 - May-23-2021, 11:21 AM
RE: New Code - by menator01 - May-23-2021, 08:39 PM

Forum Jump:

User Panel Messages

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