On Thu, 24 Nov 2016 14:49:27 +1100, Chris Angelico wrote:
> On Thu, Nov 24, 2016 at 2:41 PM, Wildman via Python-list
> wrote:
>> Point taken. I did miss the python3 part.
>>
>> I switched to raw_input because it handles an empty
>> input. An empty input would trigger the ValueError.
>> No doubt
On Thu, Nov 24, 2016 at 2:41 PM, Wildman via Python-list
wrote:
> Point taken. I did miss the python3 part.
>
> I switched to raw_input because it handles an empty
> input. An empty input would trigger the ValueError.
> No doubt with the correct code the same or similar
> could be done with inpu
On Thu, 24 Nov 2016 11:59:17 +1100, Chris Angelico wrote:
> On Thu, Nov 24, 2016 at 10:02 AM, Wildman via Python-list
> wrote:
>> Try the code that is below:
>>
>> import datetime
>> from datetime import date
>>
>> today = date.today()
>> person = input("Enter your name: ")
>> byear = raw_input("
On Thu, Nov 24, 2016 at 10:02 AM, Wildman via Python-list
wrote:
> Try the code that is below:
>
> import datetime
> from datetime import date
>
> today = date.today()
> person = input("Enter your name: ")
> byear = raw_input("Enter the four-digit year you were born: ")
Please take care of Python
On Wed, 23 Nov 2016 06:18:38 -0800, jones.dayton wrote:
> I'm just learning, so please excuse my ignorance for
> what I know is a simple issue...
>
> I'm writing a "Hello, World" type of script to see how
> things work in python3. I'm asking for input to get a
> person's birthday, then I want to
On Wed, Nov 23, 2016 at 7:13 AM, Dayton Jones
wrote:
> ah...yes, but then how could I strip the rest (h:m:s) from it?
>
> Enter the numerical month you were born: 3
> Enter the numerical day of the month you were born: 30
> Enter the year you were born: 1989
> 10100 days, 0:00:00
> --
> https://m
Ah, perfect - thanks. I was overly complicating things.
--
https://mail.python.org/mailman/listinfo/python-list
jones.day...@gmail.com writes:
> but how do I replace the "2008, 8, 18" and "2008, 9, 26" with *my* values?
> I've tried several things (which I can't remember all of) but usually end up
> with an error like this:
Something like this?
today = date.today()
birthday = date(byear, bmonth, bday)
ah...yes, but then how could I strip the rest (h:m:s) from it?
Enter the numerical month you were born: 3
Enter the numerical day of the month you were born: 30
Enter the year you were born: 1989
10100 days, 0:00:00
--
https://mail.python.org/mailman/listinfo/python-list
On 11/23/2016 09:18 AM, jones.day...@gmail.com wrote:
but how do I replace the "2008, 8, 18" and "2008, 9, 26" with *my* values?
I've tried several things (which I can't remember all of) but usually end up with an error like
this:
Does this not work for you?
d = date(byear, bmonth,
I'm just learning, so please excuse my ignorance for what I know is a simple
issue...
I'm writing a "Hello, World" type of script to see how things work in python3.
I'm asking for input to get a person's birthday, then I want to compare that to
"today" and see how many days have past.
--code-
11 matches
Mail list logo