Go Back   cgTantra Forums > Technical > Development and Programming
Development and Programming Discussions on Development of plugins, tools and utilities as well as scripts and languages

Reply
 
Submit Tools Thread Tools
Old 11-11-2011, 11:56 AM   #1
gauravh
Novice
 
Join Date: Sep 2011
Posts: 6
Rep Power: 0
gauravh is on a distinguished road
Default pls !!help getting syntax error in python

>>> def song_lyrics():
print"I m a limberjack,and I am okay."
print"I m sleep all night,and I work all days."

SyntaxError: invalid syntax

i hav just started learning python ,using v_3.2. i m trying to create definition function but getting syntax error again n again.did'nt able find the error. pls!!!help ,reply or email:i2_gaurav@yahoo.co.in
gauravh is offline   Reply With Quote
Old 11-01-2012, 11:22 AM   #2
akram.akira
Novice
 
Join Date: Jun 2007
Location: Hyderabad
Posts: 9
Rep Power: 0
akram.akira is on a distinguished road
Default

you have a syntax error in print statement, from version 3.0 print statement is in the form of print() not print "" so your code will be
Code:
def song_lyrics():
    print ("I m a limberjack,and I am okay.")
    print ("I m sleep all night,and I work all days.")
akram.akira is offline   Reply With Quote
Reply


Thread Tools

Forum Jump

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd. | 2009 CGTantra | Privacy Policy | All times are GMT +5.5. The time now is 12:08 PM.

Choose Your Color         Facebook              CGTantra Toolbar  Contact Us - cgTantra Home - Archive - Top