First post and very much a newbie to Python. Have 2.5 on Linux (GG). I
think I have set up PYTHONPATH correctly in that I can import a module
apply_bp and it complains about line 20 in apply_bp which is:
import sys, aipy, numpy, os
At the interpreter prompt, however, I can import sys, numpy etc.
hey...I know this is off the "python" topicbut I have yahoo mail and would like to change my "sender name" I have gone to the "edit account" area and have changed all names that can be edited to a consistent name other than the current sender name...but for some reason it will not change the s
HeyI have signed up to receive emails from the python forum and the amount of emails I receive on any day is fairly numerous...Does anyone know if I can somehow separate all mails coming from the python forum from all of my other mail, so I can open it from another folder or something like that
Does anyone know if there is an "answer key" to all of the exercises in "how to think like a computer scientist"sure would be a lot easier to refer to that instead of tying up this forum with questions about exercises I'm sure that have been asked before
Yahoo! FareChase - Search multiple tr
I have started out trying to learn Python for my first programming language. I am starting off with the book "how to think like a computer scientist." I spend about 4-5 hrs a day trying to learn this stuff. It is certainly no easy task. I've been at it for about 1-2 weeks now and have a very el
using the following program:
prefixes = "JKLMNOPQ"
suffix = "ack"
for letter in prefixes:
print letter + suffix
if prefixes == "O" or "Q"
print letter + "u" + suffix
For this program I am trying to combine the individual letters with the suffix to form names...but for O and Q I n
using the following program:
fruit = "banana"
index = 0
while index < len (fruit):
letter = fruit[index-1]
print letter
index= index -1
this program is supposed to spell "banana" backwards and in a vertical patern...it does thisbut after spelling "banana" it gives an error me
I am running the following program:
def print Multiples (n, high):
i = 1
while i <= high:
print n*i, ' \t' ,
i = i + 1
print
def printMultTable (high):
i = 1
while i <= high:
print Multiples (i, high)
i = i + 1
printMultiples(8,8)
printMul
ok...I am running the following program:
def printMultiples (n):
i = 1
while i <= 6:
print n*i, ' \t ',
i = i + 1
i = 1
while i <= 6:
printMultiples(i)
i = i + 1
this is supposed to return a simple multiplication table, but for some reason it does not want to s
OK...I have the following program
i = 1
while i <= 6:
print 2 * i,' ',
i = i + 1
print
this is supposed to give you a "new" blank line after the program runs instead it just gives:
2 4 6 8 10 12
>>>
instead of:
2 4 6 8 10 12
>>>
to get the above return I have
Question for the following program: sec 5.5
def factorial (n):
if n == 0:
return 1
else:
recurse = factorial (n-1)
result = n * recurse
return result
How come whenever I state the function with "n" given a value it prints no results in the interpreter for EX:
de
Can somebody tell me why you have to have "return result" in the below program as suggested in a beginner tutorial. I ran the second listed program below without "return result" and they both give the same value in Python interpreter. What does "return result" do?
def distance(x1, y1, x2, y2):
I am running the following program from the example in "how to think like a computer scientist"
def countdown(n):
if n ==0:
print "Blastoff!"
else:
print n
countdown (n-1)
countdown (1000)
When I set "n"= 1000 the program runs in interpreter and stop
i had posted a previous question but I figured it out...thanks
Yahoo! FareChase - Search multiple travel sites in one click.
--
http://mail.python.org/mailman/listinfo/python-list
Hey can somebody tell me what the "%" function does...I am not math illiterate...its just a new symbol for meis it a divisor? remainder something another??
thanks -xray-
Yahoo! FareChase - Search multiple travel sites in one click.
--
http://mail.python.org/mailman/listinfo/python-li
I am having trouble with the following example used in a tutorial:
print "Halt !"
s = raw_input ("Who Goes there? ")
print "You may pass,", s
I run this and get the following:
Halt!
Who Goes there?
--thats itif I hit enter again "You may pass,"
appears...
In the example after running y
I am using the book "how to think like a computer scientist" and am finding the examples are not working with Python 2.4.2...I have typed them exactly as they appear in the textcan someone relate to this?...is this typical b/c 2.4.2 is a newer version?
-xray-
Yahoo! FareChase - Search mul
Ok...I'm new to Python..and of course am already having troubles.
I have tried the following example from "how to think like a computer> scientist">> def newline():> print>> print "firstline"> newline()> print "secondline">> problem iswhenever I type -print "firstline"- and then hit enter
have a few questions...i'm a newbieso i'd appreciate any help
1- what is the difference between Python GUI and Python command line?
2-in Python command line when I hit enter after typing a command I cannot go back and "delete" "backspace" or otherwise edit a previous command...why?
3-I ha
19 matches
Mail list logo