Re: [Tutor] Help with code

2019-03-28 Thread Alan Gauld via Tutor
On 28/03/2019 21:12, lucasbreault2...@gmail.com wrote: > I’m trying to make a password that must contain a number in it. I assume you mean you want to check whether a password has a number in it? Does it need to be a single digit or can there be multiple? > Which method do I use for that? There

[Tutor] Help with code

2019-03-28 Thread lucasbreault2400
I’m trying to make a password that must contain a number in it. Which method do I use for that? Sent from my iPhone ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] help with code

2018-03-11 Thread Abdur-Rahmaan Janhangeer
print 30 * "-" , "MENU" , 30 * "-" # just tested in py3 you can do # 'MENU'.center(67, '-') On Sun, Mar 11, 2018 at 8:20 AM, Leslie SimondeMontfort via Tutor < tutor@python.org> wrote: > Hi, I wondered if there is someone that can help me with this code. Thank > you, Leslie > > ## Text menu in

Re: [Tutor] help with code

2018-03-11 Thread Bob Gailer
On Mar 11, 2018 6:25 AM, "Leslie SimondeMontfort via Tutor" < tutor@python.org> wrote: > > Hi, I wondered if there is someone that can help me with this code. I have to assume that you are very new to python. Have you written a Python program that runs the way you want it to? It is often useful t

Re: [Tutor] help with code

2018-03-11 Thread Cameron Simpson
On 10Mar2018 23:20, Leslie SimondeMontfort wrote: Hi, I wondered if there is someone that can help me with this code. Thank you, Leslie Generally we like to know what you think is wrong with it. For example, what you expected it to do, and a little transcript of what it actually did (cut/p

Re: [Tutor] help with code

2018-03-11 Thread Alan Gauld via Tutor
On 11/03/18 04:20, Leslie SimondeMontfort via Tutor wrote: > Hi, I wondered if there is someone that can help me with this code. I'll try but theres a lot to comment on. See below... > def print_menu(): ## Your menu design here > print 30 * "-" , "MENU" , 30 * "-" > print "1. Menu

Re: [Tutor] help with code

2018-03-11 Thread Joel Goldstick
On Sat, Mar 10, 2018 at 11:20 PM, Leslie SimondeMontfort via Tutor < tutor@python.org> wrote: > Hi, I wondered if there is someone that can help me with this code. Thank > you, Leslie > > ## Text menu in Python > > def print_menu(): ## Your menu design here > print 30 * "-" , "MENU" , 3

[Tutor] help with code

2018-03-11 Thread Leslie SimondeMontfort via Tutor
Hi, I wondered if there is someone that can help me with this code. Thank you, Leslie ## Text menu in Python def print_menu(): ## Your menu design here print 30 * "-" , "MENU" , 30 * "-" print "1. Menu login 1" print "2. Menu create an account 2" print "3. Menu list all ac

Re: [Tutor] Help With Code

2014-05-04 Thread Dave Angel
jordan smallwood Wrote in message: > > want to have the user try again if they enter in a non integer. What am I > missing: Do you perhaps mean float? If so, see the other response. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscr

Re: [Tutor] Help With Code

2014-05-04 Thread Alan Gauld
On 01/05/14 01:18, jordan smallwood wrote: Hey there, I have this code below (in to cm conversion) and I want to have the user try again if they enter in a non integer. What am I missing: A loop. There is a common pattern or idiom in Pytthon: while True: get input if input ok:

[Tutor] Help With Code

2014-05-04 Thread jordan smallwood
Hey there, I have this code below (in to cm conversion) and I want to have the user try again if they enter in a non integer. What am I missing: ConversionConstant = 2.54 def CalculateCentimeters(inches):     return ConversionConstant * inches def CalculateInches(centimeters):     return centi