473,614 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Syntax error from a total newbie

1 New Member
im super duper fresh to learning python and can't for the life of me get this syntax to go away, its happening on the print line

name = requestString(" Enter your name:")

age = requestInteger( "Enter your age:")

print name,"you are" age "years old" "!" "That's great" "!"

Invalid syntax Your code contains at least one syntax error, meaning it is not legal jython

any help would be greatly appreciated!

thanks
Jun 5 '17 #1
1 1591
dwblas
626 Recognized Expert Contributor
See the string format at this tutorial http://www.informit.com/articles/article.aspx?p=674692
Expand|Select|Wrap|Line Numbers
  1. print "%s you are %s years old! That's great!" % (name, age)
Jun 6 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
14604
by: NanQuan | last post by:
I'm hoping someone can help me solve this error since I am at a total loss here. Usually I don't bother posting on any forums or groups on the internet and prefer to solve stuff myself but this is a total mistery. I have a function inside an ASP page as a result of which I get the following error message: Microsoft VBScript compilation error '800a03ea'
1
3235
by: u473 | last post by:
I am scratching my head with the required quotes and parentheses. I started with an existing working Query with Running Total by date. Now I need to produce a running total by quarter day, so I converted my dates in serial increments of 6 hours intervals. I verified that these serial dates have the expected values. I run into repeated syntax error in the adapted Query.
1
1849
by: ruvi | last post by:
Hi, I am using Vb 6 and Access. I am getting syntax error in the following sql query. strSql = "SELECT tblInvoice.ProjID,tblInvoice.CusID,tblInvoice.InvoiceNo,tblInvoice.InvDate,tblInvoice.Total,tblInvoice.Paid,tblInvoice.Balance,tblCustomer.CustomerName FROM tblCustomer RIGHT JOIN tblInvoice ON tblCustomer.CusID=tblInvoice.CusID WHERE tblInvoice.InvDate >= #" &sDate& "# AND tblInvoice.InvDate <= #" &eDate& "# AND...
5
2134
by: berio211 | last post by:
"I keep getting the following error when I try to modify a query: Syntax error (missing operator) in query expression 'ADPINTER.'. when this happens the qyuery can no longer be seen in design view it changes to SQL view and I can't get it back to design view. the following is the sql view: SELECT ADPINTER.JOB_NUMBER, ADPINTER.EMPNO, ADPINTER., ++ AS hours, EMPMAST.RATE1AMT, * AS payrollold, EMPMAST.WORKERSCOMPCODE, ADPINTER.ENDPERIOD, 1 AS ,...
3
5058
by: broll911 | last post by:
I am gettin a error message on this script can someone help me. I am a complete newbie on this stuff. Thanks in advance for any help you can give me. here is the error. Parse error: syntax error, unexpected T_VARIABLE in /home/content/m/i/x/mixxsalon/html/FormToEmail.php on line 1 here is the code. <?php $my_email = "user@example.com"; /*
14
5495
riverdale1567
by: riverdale1567 | last post by:
Hi I am a newbie trying to get some of my first code working, yada yada yada. I have a drop down box which chooses a state then takes the post data to 'processform2.php' to use that to pull up all the rows which have the corresponding state. I am getting this 'Parse error: syntax error, unexpected T_STRING in /home/attorney/public_html/' on line 13 <? $username="XXXXXXXX"; $password="XXXXXX"; $database="XXXXXXXX";
3
1791
by: dianaroslan | last post by:
There are three errors in coding during compile. one of them is the declaration syntax error. can help me to finish coding this? really need help from anyone who knows. i have some problem with my total function and declaration. #include <iostream> #include <conio> const int listSize=1; struct employeeInfo { char name, address,noPhone;
1
1363
by: qdoet | last post by:
Could I have a problem in the following syntax error: Deprecated: Function eregi () is deprecated in C: \ xampp \ htdocs \ holiday-shelter \ feedback_kirim.php on line 8 Your email is wrong and this is the script: <?php $NmAnda=$_POST;
1
5768
by: James Long | last post by:
I am getting the following error: Parse error: syntax error, unexpected $end in E:\wamp\www\forums\view_topic.php on line 138 And i am a newbie.. I have been working on the code for ages and now it dosent work!!! HELP <?php $host="localhost"; // Host name
1
1880
by: shawnjerome | last post by:
I am attempting to combine 2 crosstab queries and I keep getting the "Syntax error in TRANSFORM statement". TRANSFORM Sum(tblPlanSavings.) AS SumOfPlanSavings SELECT tblPlanSavings., tblPlanSavings., tblPlanSavings., Sum(tblPlanSavings.) AS FROM tblPlanSavings GROUP BY tblPlanSavings., tblPlanSavings., tblPlanSavings. PIVOT Format(,"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") UNION ALL TRANSFORM...
0
8179
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8621
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8427
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6087
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5538
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4049
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4119
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1421
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.