Re: keep getting a syntax error on the very first program I am running

2022-01-14 Thread Jon Ribbens via Python-list
On 2022-01-15, Bob Griffin  wrote:
>I am running this program and keep getting this error.  Is this normal?
>
>Invalid syntax.  Perhaps you forgot a comma?
>
>Also the t in tags is highlighted.
>
>I even tried different versions of Python also.
>
>Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64
>bit (AMD64)] on win32
>
>Type "help", "copyright", "credits" or "license()" for more information.
>
>print("Hello World")
>
>Hello World
>
>input("\n\nPress the enter key to exit.")

You're only supposed to enter the lines:

print("Hello World")

and

input("\n\nPress the enter key to exit.")

The other lines are showing you the output you should see.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: keep getting a syntax error on the very first program I am running

2022-01-14 Thread MRAB

On 2022-01-15 01:12, Bob Griffin wrote:

I am running this program and keep getting this error.  Is this normal?



Invalid syntax.  Perhaps you forgot a comma?



Also the t in tags is highlighted.



I even tried different versions of Python also.



Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64
bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license()" for more information.

print("Hello World")

Hello World

input("\n\nPress the enter key to exit.")

I get an error only if I use the entirety of it as a program. Is that 
what you're doing, perhaps?


It's not actually a program, but the output from an interactive session.

You start IDLE (I'm assuming that what you're using) and it prints:

Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC 
v.1929 64

bit (AMD64)] on win32

and then shows a prompt.

At the prompt you type:

print("Hello World")

and it print the response:

Hello World

and so on.
--
https://mail.python.org/mailman/listinfo/python-list


keep getting a syntax error on the very first program I am running

2022-01-14 Thread Bob Griffin
   I am running this program and keep getting this error.  Is this normal?



   Invalid syntax.  Perhaps you forgot a comma?



   Also the t in tags is highlighted.



   I even tried different versions of Python also.



   Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64
   bit (AMD64)] on win32

   Type "help", "copyright", "credits" or "license()" for more information.

   print("Hello World")

   Hello World

   input("\n\nPress the enter key to exit.")







   Sent from [1]Mail for Windows



References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list