[Tutor] problem with code

2015-08-20 Thread Nathan Clark
I have written a basic program out of python and it is not functioning,
please could you proof read my code and tell me how to fix it.It is in
python 3.3

time=int(input("How long on average do you spend on the computer per day?")
(print("that seems reasonable")) if time<=2
else print ("get a life")
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] problem with code

2015-09-01 Thread Nathan Clark
I have written another basic program out of python, please could you
instruct me on how to fix it

question= input("What is your question)
print("Let me think about that")
time.sleep(10)  #10 seconds wait
print (question)
print ("lol")


On Thu, Aug 20, 2015 at 4:08 PM, Job  wrote:

> #i would do it this way in python2
> #maybe you can use as reference
>
> time = int(raw_input('x'))
>
> If time => 2:
> print 'y'
> else:
> print 'z'
>
> Good luck,
>
> Job
>
> > On Aug 20, 2015, at 2:50 AM, Nathan Clark <26110...@gmail.com> wrote:
> >
> > I have written a basic program out of python and it is not functioning,
> > please could you proof read my code and tell me how to fix it.It is in
> > python 3.3
> >
> > time=int(input("How long on average do you spend on the computer per
> day?")
> > (print("that seems reasonable")) if time<=2
> > else print ("get a life")
> > ___
> > Tutor maillist  -  Tutor@python.org
> > To unsubscribe or change subscription options:
> > https://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Python trouble

2015-12-29 Thread Nathan Clark
This is a  fibonnaci sequence generator, the colon causes a syntax error


#set variables
num_1 = 1
num_2 = 2
count = 0
terms = int(input("How many terms of the fibonnaci sequence would you
like?")


#function
while terms != count :
num_3 =num_1+num_2
print (num_3)
num_1=num_2
num_2 = num_3
count=count+1
else:
print ("finished")
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor