Alan Gauld via Tutor wrote:
> On 25/02/17 10:35, ehsan faraz wrote:
>> ... where “tip” is an invalid syntax.
Alan went one step ahead and addressed the logical errors, but the
SyntaxError is caused by missing closing parentheses:
>> price = int(input("Enter the menu price for your meal:")
>>
On Sat, Feb 25, 2017 at 02:35:21AM -0800, ehsan faraz wrote:
> Hello, I am working on the following assignment where “tip” is an
> invalid syntax. Can someone please tell me how to fix this? Here is
> what it should look like:
Hello, and welcome!
Why don't you show us the actual error message
On 25/02/17 10:35, ehsan faraz wrote:
> ... where “tip” is an invalid syntax.
You need to assign a value to tip before trying
to read it, otherwise tip is undefined.
Similarly you should define price before trying
to use it.
But those would give you a NameError not a
syntax error... Can you
Hello, I am working on the following assignment where “tip” is an invalid
syntax. Can someone please tell me how to fix this? Here is what it should look
like:
Welcome to Restaurant Helper.
Enter the menu price for your meal: 100
Enter your tip percentage: 15 T
he price of the meal is: 100.00
On 19/08/16 15:36, Kalpesh Naik wrote:
> #SIMPLE CALCULATOR
> while True:
> n=int(input("Enter your choice:"))
> a=int(input("Enter 1st value:"))
> print("1st value is:",a)
> b=int(input("Enter 2nd value:"))
> print("2nd value is:",b)
> if n==1:
> c=a+b
>
Sir/Mam
i am doing python language program of simple calculator but there was some
errors in my program
Please solve it and also guide me
#SIMPLE CALCULATOR
#1-Addition
#2-Subtraction
#3-Division
#4-Multiplication
#5-Modules
while True:
n=int(input("Enter your choice:"))
Brilliant! Thanks so much. Makes perfect sense. Onward and upward then!
On Thu, Feb 18, 2016 at 1:16 PM, Alan Gauld
wrote:
> On 18/02/16 14:10, Lisa Hasler Waters wrote:
> > Alan,
> >
> > Thank you so very much! This worked perfectly!
> >
> > Now, if you don't mind
On 18/02/16 14:10, Lisa Hasler Waters wrote:
> Alan,
>
> Thank you so very much! This worked perfectly!
>
> Now, if you don't mind and you have the time, can you please elaborate
> on when we (we being Python novices) would use the /Shell/ vs when it
> is best to use the /Editor/?
>
You need to
Alan,
Thank you so very much! This worked perfectly!
Now, if you don't mind and you have the time, can you please elaborate on
when we (we being Python novices) would use the *Shell* vs when it is best
to use the *Editor*?
Many, many, many thanks!
Lisa
On Wed, Feb 17, 2016 at 12:43 PM, Alan
On 17/02/16 15:45, Lisa Hasler Waters wrote:
> -When we try to select Run Run Module - we get the error message "invalid
> syntax," which points to the number 5 in Python 3.5.1
OK, that probably means you are trying to run the Python shell
window which is the wrong thing to do.
Run module is
On 9/14/2015 2:50 PM, Shannon Rodenbeck wrote:
I have downloaded Python 3.4.3 on my Mac 10.10.4. When i try running my
programs from IDLE to go on Shell i get the message that says "Invalid
Syntax". I've tried my programs on a different windows computer and it runs
and works perfectly. How do I
I have downloaded Python 3.4.3 on my Mac 10.10.4. When i try running my
programs from IDLE to go on Shell i get the message that says "Invalid
Syntax". I've tried my programs on a different windows computer and it runs
and works perfectly. How do I fix this problem so the programs are able to
run
Hello,
I am trying to use a code from Adafruit to have Python send an email when
triggered by my Arduino. I'm a novice to programming so its somewhat hard
for me. I used the code copied verbaticm only changing my email and
password, the email in there is a temporary one so I'm not worried about
On 02/11/14 23:55, Kody Fergerson wrote:
worried about you all having it. When I try to check it or run it it
comes up with invalid syntax and highlights the first @ symbol. The
code is as follows...
TO = kody.was...@gmail.com mailto:kody.was...@gmail.com
GMAIL_USER = kody.was...@gmail.com
Robert, that is my code. The error? Theres an error in your program :
invalid syntax
Closing the parenthesis helped that one, but my else statement is not
working...heres the code chunk...
if wellness != Good:
elif wellness != Well:
elif wellness != Fine:
print Oh, I'm
if wellness != Good:
elif wellness != Well:
elif wellness != Fine:
print Oh, I'm sorry you are not feeling well. I guessed
correct, right?
I think the problem is the elif's and the indents...
elif is 'else if', and should be at the same indentation level as the
previous if
tutor-bounces+christopher.henk=allisontransmission@python.org wrote on
09/24/2009 05:43:24 PM:
Robert, that is my code. The error? Theres an error in your program :
invalid syntax
Closing the parenthesis helped that one, but my else statement is not
working...heres the code chunk...
Corey Richardson kb1...@aim.com wrote
Closing the parenthesis helped that one, but my else statement is not
working...heres the code chunk...
if wellness != Good:
elif wellness != Well:
elif wellness != Fine:
print Oh, I'm sorry you are not feeling well. I guessed
18 matches
Mail list logo