I cannot nun my programs | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I cannot nun my programs

>>>print('hello world!') hello world! is that correct syntax

18th Jun 2017, 2:28 PM
Abhijeet Shitalprashadji Pande
Abhijeet Shitalprashadji Pande - avatar
6 Answers
+ 1
Remove the '>' symbols, your program should run fine.
18th Jun 2017, 2:37 PM
Lord Krishna
Lord Krishna - avatar
+ 2
okk thanx friends
18th Jun 2017, 2:51 PM
Abhijeet Shitalprashadji Pande
Abhijeet Shitalprashadji Pande - avatar
+ 1
Where are you trying this code? In the CodePlayground it works fine just remove the 3 '>' symbols, they are not included in the python syntax.
18th Jun 2017, 2:43 PM
Lord Krishna
Lord Krishna - avatar
+ 1
print('Hello world!') Just this ^ ... you do not need to repeat the words below that. Side note: While Python allows strings to use either " " or ' ' .. using the double " " is a good habit to get into. when you move to other languages The single ' ' is used for chars. You don't have to use double with python, but it will help in the long run.
18th Jun 2017, 2:44 PM
LordHill
LordHill - avatar
0
no it shows invalid syntax
18th Jun 2017, 2:41 PM
Abhijeet Shitalprashadji Pande
Abhijeet Shitalprashadji Pande - avatar
0
this syntax(print('hello world!')) is for python3 in python 2 print "HelloWorld"
18th Jun 2017, 3:22 PM
Navid Tak
Navid Tak - avatar