Python Forum
Calendar calcualtions
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calendar calcualtions
#9
(Apr-28-2017, 10:39 PM)deusvult Wrote:
(Apr-28-2017, 10:11 PM)wavic Wrote: It's hard to follow the code - the variable names are meaningless. I don't know what I am looking at all the time.

I was rushing it and it is almost my first code. If you look into it its really no that confusing, but I guess ill look for help from someone else then. Thanks for the effort anyways

If it were not confusing you would understand it and not be here for help. Your code is hard to read and even though you don't notice, it impacts *your* ability to understand it. Put descriptive names on variables and you'll have a very different view. Also add comment explaing what the intent of the code is.

PS: To test that a year is a multiple of 4: year % 4 == 0 is a bit less convoluted than (y1)/4. == float(int((y1)/4.)) (and as some have remarked even done properly this isn't sufficient to determine leap-ness).
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
Calendar calcualtions - by deusvult - Apr-28-2017, 09:54 PM
RE: Calendar calcualtions - by wavic - Apr-28-2017, 10:06 PM
RE: Calendar calcualtions - by deusvult - Apr-28-2017, 10:09 PM
RE: Calendar calcualtions - by wavic - Apr-28-2017, 10:11 PM
RE: Calendar calcualtions - by deusvult - Apr-28-2017, 10:39 PM
RE: Calendar calcualtions - by wavic - Apr-28-2017, 11:04 PM
RE: Calendar calcualtions - by Ofnuts - Apr-30-2017, 08:55 PM
RE: Calendar calcualtions - by volcano63 - Apr-28-2017, 10:38 PM
RE: Calendar calcualtions - by zivoni - Apr-28-2017, 10:39 PM
RE: Calendar calcualtions - by Larz60+ - May-01-2017, 12:00 AM
RE: Calendar calcualtions - by volcano63 - May-01-2017, 01:31 AM
RE: Calendar calcualtions - by nilamo - May-01-2017, 02:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Task calendar problem humanical 8 2,076 Sep-04-2023, 02:55 PM
Last Post: Pedroski55
  Calendar program louienyy 2 5,144 Mar-30-2020, 01:21 PM
Last Post: louienyy
Sad [Learning] Calendar without modules or list KoFu 5 5,050 Sep-09-2019, 03:25 PM
Last Post: DeaD_EyE
  Calendar calculations frequency 10 5,929 Nov-13-2018, 07:34 PM
Last Post: frequency

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020