Re: [Tutor] Dividing a float derived from a string

2014-11-21 Thread Stephanie Morrow
This one worked! Thank you very much! :D On Fri, Nov 21, 2014 at 3:14 AM, Adam Jensen wrote: > On Thu, 20 Nov 2014 21:20:27 + > Stephanie Morrow wrote: > > > Hi there, > > > > I have been posed with the following challenge: > > > > "Create a

Re: [Tutor] Dividing a float derived from a string

2014-11-21 Thread Stephanie Morrow
wrote: > On 20/11/14 21:20, Stephanie Morrow wrote: > > input = raw_input("Insert a number: ") >> if input.isdigit(): >> print int(input) * 12 >> else: >> print False >> >> /However/, a colleague of mine pointed out that a decimal wi

Re: [Tutor] Dividing a float derived from a string

2014-11-20 Thread Stephanie Morrow
What else could I do in that testing portion that would allow for a decimal point? In order for a decimal to be True, it would have to accept both the digits and the decimal point. On Thu, Nov 20, 2014 at 10:36 PM, Danny Yoo wrote: > > I have been posed with the following challenge: > > > > "Cr

[Tutor] Dividing a float derived from a string

2014-11-20 Thread Stephanie Morrow
Hi there, I have been posed with the following challenge: "Create a script that will ask for a number. Check if their input is a legitimate number. If it is, multiply it by 12 and print out the result." I was able to do this with the following code: input = raw_input("Insert a number: ") if inp