Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie help with input
#4
(Aug-28-2019, 09:10 PM)LouK Wrote: I just started into Python today and got a lot working in a few hours. But this has me stumped. I copy and paste (no typos) these two lines from a Python help site into the Terminal:
val = input("Enter your value: ") print(val) 
and the result is:
Error:
>>> val = input("Enter your value: ") Enter your value: print(val) my input Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1 print(val) my input ^ SyntaxError: invalid syntax
The print(val) line runs into the input line. I typed "My input". It all just runs together. Thanks in advance to anyone who can tell me what's wrong here. Thanks.

I'm just curious to know which Python version you are using
Reply


Messages In This Thread
Newbie help with input - by LouK - Aug-28-2019, 09:10 PM
RE: Newbie help with input - by jefsummers - Aug-28-2019, 10:16 PM
RE: Newbie help with input - by Yoriz - Aug-28-2019, 10:21 PM
RE: Newbie help with input - by Malt - Aug-29-2019, 05:59 AM
RE: Newbie help with input - by LouK - Aug-29-2019, 02:00 PM
RE: Newbie help with input - by perfringo - Aug-29-2019, 03:34 PM
RE: Newbie help with input - by LouK - Aug-29-2019, 05:38 PM
RE: Newbie help with input - by LouK - Aug-29-2019, 06:50 PM
RE: Newbie help with input - by LouK - Aug-29-2019, 08:41 PM
RE: Newbie help with input - by onlydibs - Dec-22-2019, 04:12 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Big Grin Newbie to Python - input and branching issue Sherine 3 2,341 Jul-31-2021, 01:09 AM
Last Post: Pedroski55
  Newbie ? Python 3 Input() jlgrunr 1 2,537 Feb-17-2018, 10:26 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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