Re: keep getting a syntax error on the very first program I am running

2022-01-14 Thread Jon Ribbens via Python-list
On 2022-01-15, Bob Griffin wrote: >I am running this program and keep getting this error. Is this normal? > >Invalid syntax. Perhaps you forgot a comma? > >Also the t in tags is highlighted. > >I even tried different versions of Python also. > >Python 3.10.1

Re: keep getting a syntax error on the very first program I am running

2022-01-14 Thread MRAB
On 2022-01-15 01:12, Bob Griffin wrote: I am running this program and keep getting this error. Is this normal? Invalid syntax. Perhaps you forgot a comma? Also the t in tags is highlighted. I even tried different versions of Python also. Python 3.10.1

keep getting a syntax error on the very first program I am running

2022-01-14 Thread Bob Griffin
I am running this program and keep getting this error. Is this normal? Invalid syntax. Perhaps you forgot a comma? Also the t in tags is highlighted. I even tried different versions of Python also. Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929

Re: First Program with Python!

2016-02-11 Thread mentificium
On Tuesday, February 9, 2016 at 5:55:30 AM UTC-8, Anita Goyal wrote: > > Start learning Python from basics to advance levels here... > https://goo.gl/hGzm6o Python experts please translate the webserver "Ghost" Perlmind into Python. http://ai.neocities.org/P6AI_FAQ.html --

First Program with Python!

2016-02-09 Thread anitagoyal571
Python is a very powerful high-level, object-oriented programming language.Python has a very easy-to-use and simple syntax, making it the perfect language for someone trying to learn computer programming for the first time. Python is an interpreted language. Interpreter is a program that

Re: Help with my 8-year old son's first program. I'm stuck

2014-01-27 Thread john pierce
First, forget about the def a() statement. def is for defining a function and this is not a function. Second, research the difference between == (logical test) and = (assignment operator). Third, take a look at the length of op just after the readline(). You can add a line that says

Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread justinpmullins
My son is learning Python and I know nothing about computers. He's written a simple calculator program that doesn't work. For the life of me, I can't see why. Any help gratefully received. Here's his code: def a(): import sys print(welcome to the calculation)

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread Ervin Hegedüs
Hello, On Sat, Jan 25, 2014 at 02:02:15AM -0800, justinpmull...@gmail.com wrote: My son is learning Python and I know nothing about computers. :) He's written a simple calculator program that doesn't work. For the life of me, I can't see why. Any help gratefully received. Here's his code:

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread justinpmullins
PS: At the first statement, we've also tried op == d: But that doesn't work either. On Saturday, January 25, 2014 10:02:15 AM UTC, justinp...@gmail.com wrote: My son is learning Python and I know nothing about computers. He's written a simple calculator program that doesn't work. For

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread Peter Otten
justinpmull...@gmail.com wrote: My son is learning Python and I know nothing about computers. He's written a simple calculator program that doesn't work. Normally you are supposed to explain what you or your son expect and what you get instead. If Python ends with an error you should paste

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread Denis McMahon
On Sat, 25 Jan 2014 02:02:15 -0800, justinpmullins wrote: def a(): import sys print(welcome to the calculation) print(please type a number) one = int(sys.stdin.readline()) print(type d for division,) print(type m for multiplication,) print(type s for subtraction,)

Re: Help with my 8-year old son's first program. I'm stuck!

2014-01-25 Thread justinpmullins
Thanks Peter, that did the trick. You've got here a very happy 8-year old and a mighty relieved 46-year old!! On Saturday, January 25, 2014 10:41:20 AM UTC, Peter Otten wrote: justinpmull...@gmail.com wrote: My son is learning Python and I know nothing about computers. He's written

Re: First program

2010-06-15 Thread Gabriel Genellina
En Sat, 12 Jun 2010 06:03:43 -0300, Phil H skilp...@gmail.co.za escribió: Trying my hand with Python but have had a small hiccup. Reading 'A byte of Python' and created helloworld.py as directed. #!/usr/bin/python # filename : helloworld.py print 'Hello World' At the terminal prompt cd to

Re: First program

2010-06-15 Thread Phil Hansen
On Tue, 15 Jun 2010 04:53:52 -0300, Gabriel Genellina wrote: Looks like you created helloworld.py on Windows, or using Windows-oriented tools (perhaps a samba drive? ftp from a Windows disk?) Windows text files end each line with the \r\n sequence (CR LF, bytes 0x0D 0x0A, ^M^J). Unix (and

First program

2010-06-12 Thread Phil H
Hi, Trying my hand with Python but have had a small hiccup. Reading 'A byte of Python' and created helloworld.py as directed. #!/usr/bin/python # filename : helloworld.py print 'Hello World' At the terminal prompt cd to the file location and run from the prompt. p...@grumpy:~/projects/python$

Re: First program

2010-06-12 Thread Chris Rebert
On Sat, Jun 12, 2010 at 2:03 AM, Phil H skilp...@gmail.co.za wrote: Hi, Trying my hand with Python but have had a small hiccup. Reading  'A byte of Python' and created helloworld.py as directed. #!/usr/bin/python # filename : helloworld.py print 'Hello World' At the terminal prompt cd to

Re: First program

2010-06-12 Thread Peter Otten
Phil H wrote: Hi, Trying my hand with Python but have had a small hiccup. Reading 'A byte of Python' and created helloworld.py as directed. #!/usr/bin/python # filename : helloworld.py print 'Hello World' At the terminal prompt cd to the file location and run from the prompt.

Re: First program

2010-06-12 Thread Phil H
On Sat, 12 Jun 2010 09:03:43 +, Phil H wrote: Hi, Trying my hand with Python but have had a small hiccup. Reading 'A byte of Python' and created helloworld.py as directed. snip Any help appreciated Phil Thanks Peter Chris for your prompt replies. The line ending was the problem. The

Re: First program

2010-06-12 Thread Peter Otten
Phil H wrote: On Sat, 12 Jun 2010 09:03:43 +, Phil H wrote: Hi, Trying my hand with Python but have had a small hiccup. Reading 'A byte of Python' and created helloworld.py as directed. snip Any help appreciated Phil Thanks Peter Chris for your prompt replies. The line ending

Re: First program

2010-06-12 Thread Phil Hansen
On Sat, 12 Jun 2010 12:51:18 +0200, Peter Otten wrote: Phil H wrote: The script was written using Gedit on Ubuntu. Strange. Did you perhaps start with a file that you got from elsewhere and modified that? Gedit may have left the CRs untouched then. Cannot find a setting in Gedit to set

Re: First program

2010-06-12 Thread Alister
On Sat, 12 Jun 2010 10:04:02 +, Phil H wrote: On Sat, 12 Jun 2010 09:03:43 +, Phil H wrote: Hi, Trying my hand with Python but have had a small hiccup. Reading 'A byte of Python' and created helloworld.py as directed. snip Any help appreciated Phil Thanks Peter Chris for your

RE: First Program Bug (Newbie)

2008-03-19 Thread Andreas Tawn
[snip] What is the square root function in python? There's one in the math module. Use the one in gmpy if you have it. Or raise to the power 1/power 9**(1.0/2) 3.0 Also works for cube root, quad root etc. 27**(1.0/3) 3.0 81**(1.0/4) 3.0 243**(1.0/5) 3.0 Cheers, Drea --

Re: First Program Bug (Newbie)

2008-03-18 Thread oog1e
Hey, big thanks to you and Gabriel for replying. I couldn't quite follow what you did yet. What is this 'gimpy' thing and where can I read about it? In response: First: Heh, I'm a little embarrassed I didn't notice this. I thought 'I only need to check up to half' but it didn't occur that

Re: First Program Bug (Newbie)

2008-03-18 Thread Mensanator
On Mar 18, 6:39 pm, oog1e benjamin.serrato\@G(oog1e)MAIL.com wrote: Hey, big thanks to you and Gabriel for replying. I couldn't quite follow what you did yet. What is this 'gimpy' thing gmpy. It's the GMP (Gnu Multi-Precision) C-library in a Python wrapper. It supports arbitrary precision

First Program Bug (Newbie)

2008-03-17 Thread Benjamin Serrato
I Found It!! The following was a post asking for help finding a bug. I thought I needed help with my syntax, but just before sending I found the bug on line 13. Line 13 should read: base = 2. I would still appreciate any comments on my program. Maybe there is a better way to do it that I

Re: First Program Bug (Newbie)

2008-03-17 Thread Mensanator
On Mar 17, 7:03 pm, Benjamin Serrato [EMAIL PROTECTED] wrote: I Found It!! The following was a post asking for help finding a bug. I thought I needed help with my syntax, but just before sending I found the bug on line 13. Line 13 should read: base = 2. I would still appreciate any comments on

Re: First Program Bug (Newbie)

2008-03-17 Thread Daniel Fetchinson
P.S. What is the chance I'll get spam for using my real email address? Exactly 1. I currently don't get any so... ... you will get now. Sorry to disappoint you, but it's better to be prepared in advance than be shocked later :) Cheers, Daniel --

Re: First Program Bug (Newbie)

2008-03-17 Thread Gabriel Genellina
On 17 mar, 21:03, Benjamin Serrato [EMAIL PROTECTED] wrote: I Found It!! The following was a post asking for help finding a bug. I thought I needed help with my syntax, but just before sending I found the bug on line 13. Line 13 should read: base = 2. I would still appreciate any comments on

Re: First Program Bug (Newbie)

2008-03-17 Thread Jeff Schwab
Benjamin Serrato wrote: P.S. What is the chance I'll get spam for using my real email address? Fendi Chef Bag in Zucca Print - Black Trim Replica AAA, Fake HandBags Cheap Chef Bag in Zucca Print - Black Trim Bags Link : http://www.cnreplicas.com/Fendi_1439.html Chef Bag in Zucca Print - Black

Need help with first program to connect to mysql database via apache and python.

2008-02-06 Thread pythonbrian
I am just learning python and I am trying to create a simple connection to a mysql table via Python and Apache, using a Python program Unfortunately I keep getting an internal server error (50), when I bring it up in my browser ... information attached. Any help would be appreciated ... Thx,

Re: Need help with first program to connect to mysql database via apache and python.

2008-02-06 Thread Steve Holden
pythonbrian wrote: I am just learning python and I am trying to create a simple connection to a mysql table via Python and Apache, using a Python program Unfortunately I keep getting an internal server error (50), when I bring it up in my browser ... information attached. Any help would be