Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Python3, What is the SyntaxError: File “/home/main.py”, line 1 /*********************************

+1 vote
asked Jul 3, 2023 by Karen Schwarzbauer (130 points)
I keep getting this problem every time I try to use compiler, with any program.  What gives?

I notice the Hello World program that opens in the compiler has this as a first line, but mine does not.??

1 Answer

0 votes
answered Jul 3, 2023 by Peter Minarik (86,240 points)
edited Jul 4, 2023 by Peter Minarik

The line

/************

is a (beginning of a) comment in C/C++/C#/Java and other languages. In Python, that is not a comment and causes a syntax error. Just delete all the comments with the welcome message.

In Python, you start a comment with the hash symbol: #. Alternatively, you can mark things as a string literal that would have a similar effect as a comment if you never assign it to a variable:

# This is a comment
''' This also works as a comment '''
print('Hello!')

If you still have problems that you cannot overcome, please, share your entire code.

Good luck!

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...