Re: [Tutor] What is day of week from either 20180211 or 02112018 (SOLVED)

2018-02-06 Thread Ken Green
On 02/06/2018 03:36 PM, Mark Lawrence wrote: On 06/02/18 19:45, Ken Green wrote: Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below

Re: [Tutor] What is day of week from either 20180211 or 02112018 (SOLVED)

2018-02-06 Thread Ken Green
On 02/06/2018 03:20 PM, David Rock wrote: On Feb 6, 2018, at 13:45, Ken Green wrote: Traceback (most recent call last): File "A_Weekday.py", line 20, in answer = datetime.date(year, month, day).weekday() NameError: name 'datetime' is not defined Your error message tells you the probl

Re: [Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread Mark Lawrence
On 06/02/18 19:45, Ken Green wrote: Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below. Running Python 2.7 on Ubuntu 16.04. Thanks. ==

Re: [Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread David Rock
> On Feb 6, 2018, at 13:45, Ken Green wrote: > Traceback (most recent call last): > File "A_Weekday.py", line 20, in > answer = datetime.date(year, month, day).weekday() > NameError: name 'datetime' is not defined Your error message tells you the problem. You are importing date _from_ d

[Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread Ken Green
Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below. Running Python 2.7 on Ubuntu 16.04. Thanks. ===

Re: [Tutor] EXTERNAL: fix overwriting issue

2018-02-06 Thread Joaquin Henriquez
Hi This is a python forum and we try to help as much as possible. It wpuld be usefull from your side to put the python code you are trying to run an explain whats is wrong and what you are trying to do. BR -Original Message- From: Tutor [mailto:tutor-bounces+joaquin.henriquez=counte

Re: [Tutor] Fwd: Re: fractions from Fractions

2018-02-06 Thread Wolfgang Maier
On 06.02.2018 10:53, Alan Gauld via Tutor wrote: You would have needed something like fraction = Fraction(input('>')) Assuming Fraction has a string based constructor which I don't think it does. I really don't think Fraction helps you here. Oh, most certainly it has - though it may accept m

Re: [Tutor] fix overwriting issue

2018-02-06 Thread Alan Gauld via Tutor
On 06/02/18 10:34, renukesh nk wrote: > i am facing issue while writing files to a folder, where the files get > overwrite if they have same file names , so any help me to fix That's just what happens, what did you expect to happen? The same would be true id you saved a file from notepad, if you

[Tutor] fix overwriting issue

2018-02-06 Thread renukesh nk
Hi, i am facing issue while writing files to a folder, where the files get overwrite if they have same file names , so any help me to fix thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.

Re: [Tutor] Fwd: Re: fractions from Fractions

2018-02-06 Thread Alan Gauld via Tutor
On 06/02/18 09:26, Alan Gauld via Tutor wrote: > Forwarding to list, please always use Reply ALL or Reply LIst to send > mail to the list. > > What input did you use and what output did you get? > > Input 239/30  --->  7 1 29 > Input 415/93  --->  4 2 6 7 > > So far as I can tell your algorithm

[Tutor] Fwd: Re: fractions from Fractions

2018-02-06 Thread Alan Gauld via Tutor
Forwarding to list, please always use Reply ALL or Reply LIst to send mail to the list. -Original Message- From: Alan Gauld via Tutor To: tutor Sent: Mon, Feb 5, 2018 4:50 am Subject: Re: [Tutor] fractions from Fractions On 05/02/18 04:11, Rex Florian via Tutor wrote: > The problem i