0
I want to write something else in my first program is instead of Hello World. But it's showing syntax error every time
can't I write anything else other than Hello world
3 ответов
+ 5
Don't give up. Getting a syntax error in python is usually followed by an error code and can thereby be traced and corrected. Something completely different in coding other to any other artform is the indentation block. sometimes the message says something like: Expected an indentation block and a line. then it wants you move that line 4 spaces to the right. this makes the code respond to different sections.
Dr.
+ 1
I'm assuming that you're using the IDLE Python Shell? If this is the case, you'll need to submit all the syntax to the console individually.
An example of a program could be the following:
>>>nums = '1,3,5'
>>>print(nums)
In order for this to work on the IDLE shell, you'll need to write out >>>nums = '1,3,5' and hit enter. Then you can write out >>>print(nums) and you should get the appropriate output without any syntax errors. This holds true for all programs of varying complexities.
In future, it would be more useful if you were to supply more information with your problem in order to attain a more accurate response.
0
can you give some examples?