I need a lesson.

F. G. Brown fgbrown at ionet.net
Wed Jun 7 19:56:19 EDT 2000


Greetings,
I just recently started learning to program using Python, and to be honest
when it comes to programming I'm almost dumb as a rock.  I've done some
Qbasic, but I consider it a dead language as far as the future is concerned
and wish to concentrate my efforts with Python.
Here's the rub.  The following is a module called howfast.py that I can't
get to repeat.  In Qbasic I would have used a goto at the end and it would
have worked fine.  Of course there is no goto in Python and that where I can
use anyone's help.  See if you can understand what I'm trying to accomplish
below, it's a little scrambled towards the end, and tell me the error of my
ways.  I have the book "Learning Python" but I'm still stuck.  If there are
any questions I'll be glad to reply.
Thanks,
Fred
?????????????????????????????????????????????

howfast.py

a = input("What is the distance you traveled in miles?  ")
b = input("How many seconds did it require?  ")
c = a*3600.00/b
print "You were going %d mph!" %c
if c > 75:
 print "Hey you better slow down!"
d = raw_input ("Would you like to do another? (y)es or (n)o")
if d == 'y':
 print 'Here we go!'
else:
 print 'See ya!'



From: sansonj72 at aol.com (Sansonj72)
Newsgroups: comp.lang.python
Subject: Help
Lines: 5
NNTP-Posting-Host: ladder07.news.aol.com
X-Admin: news at aol.com
Date: 07 Jun 2000 23:17:32 GMT
Organization: AOL http://www.aol.com
Message-ID: <20000607191732.11126.00000004 at ng-ci1.aol.com>
Path: news!uunet!ffx.uu.net!newsfeed.mathworks.com!portc01.blue.aol.com!audrey04.news.aol.com!not-for-mail
Xref: news comp.lang.python:98542
To: python-list at python.org
Sender: python-list-admin at python.org
Errors-To: python-list-admin at python.org
X-BeenThere: python-list at python.org
X-Mailman-Version: 2.0beta3
Precedence: bulk
List-Id: General discussion list for the Python programming language <python-list.python.org>

I download python from http://www.python.org and I openned the file, and then
moved both files to c:\ and I run my learning fil called helloworld.py and I
get an error. It acts like the program is not there. Please give me a few tips.

james at lemode.com



More information about the Python-list mailing list