why not?

2013-01-21 Thread kwakukwatiah
f = open(r'c:\text\somefile.txt') for i in range(3): print str(i) + ': ' + f.readline(), please with the print str(i) + ā€˜: ā€˜ + f.readline(), why not print str(i) + f.readline(),-- http://mail.python.org/mailman/listinfo/python-list

need explanation

2013-01-21 Thread kwakukwatiah
please I need some explanation on sys.stdin and sys.stdout, and piping out-- http://mail.python.org/mailman/listinfo/python-list

help

2013-01-11 Thread kwakukwatiah
pls this is a code to show the pay of two people.bt I want each of to be able to get a different money when they enter their user name,and to use it for about six people. database = [ ['Mac'], ['Sam'], ] pay1 = 1000 pay2 = 2000 name = raw_input('Enter your name: ') if [name] in datab

Re: please i need explanation

2013-01-11 Thread kwakukwatiah
-Original Message- From: K. Elo Sent: Friday, January 11, 2013 3:56 AM To: python-list@python.org Subject: Re: please i need explanation Hi! Since there is no stated question, I need to guess: n -= 1 (instead of "f -= 1") should work. Or maybe the question was a totally different

please i need explanation

2013-01-11 Thread kwakukwatiah
def factorial(n): if n<2: return 1 f = 1 while n>= 2: f *= n f -= 1 return f -- http://mail.python.org/mailman/listinfo/python-list

Re: new to python and programming at large.

2013-01-09 Thread kwakukwatiah
-Original Message- From: Dave Angel Sent: Wednesday, January 09, 2013 12:00 PM To: python-list@python.org Subject: Re: new to python and programming at large. On 01/09/2013 05:28 PM, kwakukwat...@gmail.com wrote: thanks for ur help I wz able to do it.but I wish to expand it by asking

new to python and programming at large.

2013-01-09 Thread kwakukwatiah
thanks for ur help I wz able to do it.but I wish to expand it by asking a user to input a number for the sqrt to be calculated it I dd it this way but its not working. from math import sqrt number = raw_input('enter a number:') def number(y): return number(Y) thnx-- http://mail.python.or

new to python and programming at large

2013-01-09 Thread kwakukwatiah
pls I want to write a function that can compute for the sqrt root of any number.bt it not working pls help. from math import sqrt def squareroot(self): x = sqrt(y) print x-- http://mail.python.org/mailman/listinfo/python-list

new to python and programming at large

2013-01-09 Thread kwakukwatiah
pls I want to write a function that can compute for the sqrt root of any number.bt it not working pls help. from math import sqrt def squareroot(self): x = sqrt(y) print x-- http://mail.python.org/mailman/listinfo/python-list

help

2013-01-07 Thread kwakukwatiah
download wxpython but whenever I try to use it I get this I’m a beginner in python pls I need help. Traceback (most recent call last): File "C:/Python27/wxp.py", line 1, in import wx File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in from wx._core im