[Tutor] binding a button to an entry

2012-05-01 Thread ADRIAN KELLY
Hi all, Please can anyone tell me how i bind the activation of a button with input from an entry widget. i know i should be using classes etc. but i don't understand them fully yet.. problem here is that no matter what i enter in the entry window it displays as password incorrect. from Tkinter

[Tutor] stuck on null values

2012-03-15 Thread ADRIAN KELLY
=raw_input("Enter the number of kids: ") price=child*number_childprint """___ Thank you, the Price will be: """,price print"""

Re: [Tutor] FW: null inputs

2012-03-15 Thread ADRIAN KELLY
thanks very much i get it now... > From: hugo.yo...@gmail.com > Date: Thu, 15 Mar 2012 16:03:12 +0100 > Subject: Re: [Tutor] FW: null inputs > To: eire1...@gmail.com > CC: kellyadr...@hotmail.com; tutor@python.org > > On Thu, Mar 15, 2012 at 3:56 PM, James Reynolds wrote: > >

[Tutor] FW: null inputs

2012-03-15 Thread ADRIAN KELLY
Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 From: kellyadr...@hotmail.com To: tutor@python.org Subject: null inputs Date: Thu, 15 Mar 2012 14:19:16 + Hi guys, how do i prevent a user from leaving a blank when inputting? e.g. age=int(input("

[Tutor] null inputs

2012-03-15 Thread ADRIAN KELLY
Hi guys, how do i prevent a user from leaving a blank when inputting? e.g. age=int(input("what age are you? ")).. i want to stop the user pressing enter if age==""? Adrian Kelly 1 Bramble Close Baylough Athlone County W

Re: [Tutor] appending to a file on a new line

2012-01-19 Thread ADRIAN KELLY
utor] appending to a file on a new line > From: joel.goldst...@gmail.com > To: kellyadr...@hotmail.com > CC: tutor@python.org > > On Thu, Jan 19, 2012 at 9:32 AM, ADRIAN KELLY wrote: > > Hi everyone, > > is there an easy way to write to a file (that already exists with data

[Tutor] appending to a file on a new line

2012-01-19 Thread ADRIAN KELLY
Hi everyone, is there an easy way to write to a file (that already exists with data contained) on a new line. I understand that the file pointer appends where it left off but how do i write to the next line or even skip a line if possible? User_info=open("C:\\Documents and Settings\\akelly\\D

Re: [Tutor] reset password program

2011-12-16 Thread ADRIAN KELLY
500 > From: d...@davea.name > To: kellyadr...@hotmail.com > CC: tutor@python.org > Subject: Re: [Tutor] reset password program > > On 12/16/2011 05:02 PM, ADRIAN KELLY wrote: > > Hi guys, > > i created a program that allows users to login using a password that i set > >

[Tutor] reset password program

2011-12-16 Thread ADRIAN KELLY
Hi guys, i created a program that allows users to login using a password that i set at the top of the program. Among other things users are given the option to change their password. My questions is; Is it possible for me to make this new password stick, in other words when they shut down

Re: [Tutor] list, tuple or dictionary

2011-11-29 Thread ADRIAN KELLY
Sound Wayne, thank you From: waynejwer...@gmail.com Date: Tue, 29 Nov 2011 15:11:46 -0600 Subject: Re: [Tutor] list, tuple or dictionary To: kellyadr...@hotmail.com CC: tutor@python.org On Tue, Nov 29, 2011 at 3:04 PM, ADRIAN KELLY wrote: thanks guy, i was thinking of using a

Re: [Tutor] list, tuple or dictionary

2011-11-29 Thread ADRIAN KELLY
w would i go about adding, for example tea and eggs to get a subtotal? Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 From: waynejwer...@gmail.com Date: Tue, 29 Nov 2011 14:49:00 -0600 Subject: Re: [Tutor] list, tuple or dictionary To: kellyadr...@hotmail.com CC: tut

[Tutor] list, tuple or dictionary

2011-11-29 Thread ADRIAN KELLY
i am trying to create a program that will allow users to enter items and their prices; should i be looking at a list, tuple or what? many thanksadrian ___ Tutor maillist - Tutor@python.org To unsubscribe

[Tutor] FW: How do i show discount?(sorted)

2011-11-19 Thread ADRIAN KELLY
From: kellyadr...@hotmail.com To: kellyadr...@hotmail.com Subject: RE: How do i show discount? Date: Sat, 19 Nov 2011 23:34:27 + sorted it guys, used a third function Adrian From: kellyadr...@hotmail.com To: tutor@python.org Subject: How do i show discount? Date

[Tutor] How do i show discount?

2011-11-19 Thread ADRIAN KELLY
def shop(total_spend):min_spend=25discount_amount=150discount=0.05 if total_spend >= min_spend and total_spend > discount_amount: checkout=total_spend-(total_spend*discount) discount=total_spend*discountelse:checkout = total_spend discount =

[Tutor] urgent help!!!!!!!!!!!

2011-11-17 Thread ADRIAN KELLY
n amount over 50: 'else:total=exchange(amount)print 'Your exchange comes to: ',total Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 From: waynejwer...@gmail.com Date: Thu, 17 Nov 2011 16:53:59 -0600 Subject: Re: [Tutor] please h

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread ADRIAN KELLY
i know i should use input but when i changed to raw_input it wouldn't recognise the word print on the next line. honestly i have tried everything to get this working..i am 6 hrs at one program Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread ADRIAN KELLY
total=exchange(amount)print 'Your exchange comes to: ',total main() Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 From: waynejwer...@gmail.com Date: Thu, 17 Nov 2011 15:35:29 -0600 Subject: Re: [Tutor] please help - stuck for hours To: kellyadr.

[Tutor] infinite loop

2011-11-17 Thread ADRIAN KELLY
#i am nearly there guys..please loop at the infinite loop i am getting here..PLEASE!!#ADRIAN def exchange(cash_in):euro=1dollar=float(1.35)base=50if cash_in>base:totalreturn=cash_in*dollarelse:totalreturn=0 return totalreturn amoun

[Tutor] please help - stuck for hours

2011-11-17 Thread ADRIAN KELLY
i have tried everything, i am trying to build in a loop to my 2 functions which worked fine up until my latest sorti. please have a look if you can.. def exchange(cash_in):euro=1dollar=1.35base=50if cash_in>base: totalreturn=cash_in*dollarelse:tota

Re: [Tutor] local variable referenced before assignment

2011-11-17 Thread ADRIAN KELLY
local variable referenced before assignment > > On 11/17/2011 01:47 PM, ADRIAN KELLY wrote: > > hi all,keep getting the above error, can't understand or fix it, can anyone > > help. > > def exchange():euro=1dollar=1.35base=50amount = input ('how &

[Tutor] local variable referenced before assignment

2011-11-17 Thread ADRIAN KELLY
7;not enough'return totalreturn print exchange() Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription opt

[Tutor] format integer to currency

2011-11-16 Thread ADRIAN KELLY
print ("i own {0:.2f} {1}".format(1.1,"million")) can anyone help me with code to change the format of this to currency €1.10 million thanks for your help ___ Tutor maillist - Tutor@python.org To unsubscrib

Re: [Tutor] modulus

2011-11-16 Thread ADRIAN KELLY
really appreciate that answer thanks very much.. Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 From: waynejwer...@gmail.com Date: Wed, 16 Nov 2011 09:59:50 -0600 Subject: Re: [Tutor] modulus To: kellyadr...@hotmail.com CC: tutor@python.org On

[Tutor] modulus

2011-11-16 Thread ADRIAN KELLY
Please can anyone tell me how i can print this without all the brackets and commas, i know i need the modulus symbol but i dont know how it works. any advice would be appreciated regards adrian def arguments(): name=raw_input ("Please enter your firstname: ") surname=raw_input ("Ent

[Tutor] changing dictionary to lowercase

2011-10-27 Thread ADRIAN KELLY
Hi all, is it possible to change a dictionary list to lowercase..without having to retype? e.g. definitions={"Deprecated": "No longer in use", "Depreciation": "fall in value of an asset"} i have tried definitions=definitions.lower() regards adrian _

[Tutor] printing a key not a value

2011-10-25 Thread ADRIAN KELLY
if i have a dictionary called definitions is there a way of printing the keys and not the values that go with them? thanks so much Adrian___ Tutor maillist - Tutor@python.org To unsubscribe or change

[Tutor] (no subject)

2011-10-17 Thread ADRIAN KELLY
Hello world, can anyone tell me how i can perfect the program below. it works find (prints 6 random numbers within a range) but on occasions the numbers are repeated. Thanks so much everyone #program that will allow the user to generate random numbers #from a range that they select. impor

[Tutor] FW: 6 random numbers(again)

2011-10-17 Thread ADRIAN KELLY
> Subject: Re: [Tutor] 6 random numbers > From: shanta...@gmail.com > Date: Mon, 17 Oct 2011 01:53:18 +0530 > CC: tutor@python.org > To: kellyadr...@hotmail.com > > On 17-Oct-2011, at 1:13 AM, ADRIAN KELLY wrote: > > > hello all, > > anyone know ho

[Tutor] 6 random numbers

2011-10-16 Thread ADRIAN KELLY
hello all, anyone know how i would go about printing 6 random numbers, i know i could copy and paste 6 times (which would work) but i was thinking about a while loop, ie. while lottery_numbers.count is <7. Is it possible to code this? is it possible to count random variables? i am trying to ke

[Tutor] basic problem

2011-10-06 Thread ADRIAN KELLY
Hi all, can someone spell out to me in (simply if possible) what this programme is doing. i understand the concept of the "for" loop and what its doing with the message the user enters. i just cant understand the VOWELS and how it keeps adding 1 letter to the message. thanks for looking

Re: [Tutor] guess age programme (still stuck!!!!!)

2011-09-30 Thread ADRIAN KELLY
:print "Correct...well done!!"else:breakprint "Out of attempts" print "\n\nGood guess!!" input ("\n\nPress the enter key to exit.") Date: Fri, 30 Sep 2011 14:31:52 +0200 From: cwi...@compuscan.co.za T

[Tutor] guess age programme (please help)

2011-09-30 Thread ADRIAN KELLY
Hi all, can anyone help me with the attached programme. it is fairly basic (like me) i want it to ask the user to guess the age and countdown when making incorrect guesses. it doesn't seem to count the first attempt (run it and see please). i also want to know how to go about setting a cond

[Tutor] last part of my programme

2011-09-29 Thread ADRIAN KELLY
can anyone tell me why the last part of my programme wont work. i want the user to have to press enter to exit but it doesn't happen through the python interface. the programme works fine otherwise but just shuts down when finished thanks all adrian

[Tutor] password loop

2011-09-23 Thread ADRIAN KELLY
Can anyone help me with the programme below; i hope you can see what i am trying to do, if i enter the wrong password the loop goes on forever and if i enter the right one nothing is printed... i am a newbieall comments welcome thanks adrian print 'hello' print 'i

[Tutor] guess-my-number programme

2011-09-23 Thread ADRIAN KELLY
its meant to count the number of guesses made by the user by adding 1 but i just cant figure out how it does this..can someone explain?? i.e. tries = 1, tries +1 etc cant get my head around it... thanks all Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeat