python: v. 2.7.1Compiler: WING IDEOS: Windows 7
I am attempting to use a loop to output a 2D array for days and amount of 
pennies.  I have it set to loop to do a penny times the day then to double the 
the penny and add a day. (the whole a penny doubles each day problem). However 
when I run my program I don't get anything, no output.
#Nic  11/5/2011#Penny +=1 Each Day
from math import *from numberTest import *from clearPause import *from locale 
import *#=============================================Main

def main():    days=indays()    salary = calc(days)        
#=========================== Days inputdef indays():    integer=0    while 
integer==0:        salary = raw_input("how many days for your salary? ")        
integer,salary=testinteger(salary)        if integer ==0:            print 'the 
entry was not numeric - Please re-enter'            pause()        elif salary 
< 0:            print 'please enter a number greater then 0'            integer 
=0        else:            integer=1    return salary
#=================================Calculation
def calc(days):    n=0    d=1    while n>days:        n+1        d**(n)        
d*2              x = array ([d,n])        print x           main()              
                           
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to