Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with syntax error
#1
I am just practicing with python and I keep getting invalid syntax pop up. I want it to end the script if the user says no. Please help!

print (" Hello, I will be asking you multiple questions to build a profile of who you are.")
answer = input ("Is this ok?")
if answer == ("no") 
import sys
sys.exit()
if awnser == ("yes")             
Name = input(" First of all, what is your name?")
print ("Ahh, hello " + Name )
Age = input ("Now " + Name + " What is your age? Now I must ask you enter this in numbers otherwise I will get confused")
Address = input ("What is your address?"
Reply


Messages In This Thread
problem with syntax error - by jobemorgan - Jul-26-2017, 06:36 PM
RE: problem with syntax error - by sparkz_alot - Jul-26-2017, 06:45 PM
RE: problem with syntax error - by sparkz_alot - Jul-26-2017, 07:16 PM
RE: problem with syntax error - by Larz60+ - Jul-26-2017, 08:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  is this really a syntax error? Skaperen 4 468 May-25-2024, 07:31 AM
Last Post: snippsat
  World Clock syntax error OscarBoots 1 358 May-03-2024, 05:20 AM
Last Post: snippsat
  Syntax error for "root = Tk()" dlwaddel 15 1,897 Jan-29-2024, 12:07 AM
Last Post: dlwaddel
Photo SYNTAX ERROR Yannko 3 593 Jan-19-2024, 01:20 PM
Last Post: rob101
  Syntax error while executing the Python code in Linux DivAsh 8 2,096 Jul-19-2023, 06:27 PM
Last Post: Lahearle
  Code is returning the incorrect values. syntax error 007sonic 6 1,514 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  syntax error question - string mgallotti 5 1,539 Feb-03-2023, 05:10 PM
Last Post: mgallotti
  Python Pandas Syntax problem? Wrong Output, any ideas? Gbuoy 2 1,049 Jan-18-2023, 10:02 PM
Last Post: snippsat
  Syntax error? I don't see it KenHorse 4 1,485 Jan-15-2023, 07:49 PM
Last Post: Gribouillis
  Syntax error tibbj001 2 1,073 Dec-05-2022, 06:38 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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