Ad
  • Custom User Avatar

    Nice one,
    I had difficulties fixing it though.

  • Default User Avatar

    "...create more quadrants"

    um, wat? how? anyway, it will not return a number, it will return 'None'

  • Default User Avatar

    While it's short, what would happen if someone goes beyond inserting 12? It will return a number and create more quadrants. It might be the tidiest, shortest or even the fastest and it's quite enough for the exercise/instructions at hand, but the solution above seems to be more grounded to me.
    But at the end of the day I'm just a beginner.

  • Default User Avatar

    This is a lot of code... You can use math or use something similar to my solution as well

  • Default User Avatar

    Thanks for sharing:) I could feel your passion for coding.
    For me, I often find taking breaks helpful in solving coding problems: a complicate kata that seemed impossible to understand at first glance may somehow become intuitive the next day.
    Those "Eureka!" moments are the ones supporting my python learning.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    For me it's challenging because I have no background in CS or programming. But using Google and other online resources has helped me improve. Some challenges are more math based too so that adds to the challenge for me.

    You will develop good problem solving skills because after a while you will find yourself re-reading the instructions so you understand the root of the problem.

    There are a lot of skilled people here so look at their code to see how your solution compares to theirs and also if you understand what they were doing and why. Enjoy!

  • Default User Avatar

    Hi! I read your message today. You were 8 kyu 5 months ago? Is it hard to improve?

  • Custom User Avatar

    Unless performance is an issue, this code is much more readable. Any programmer can look at it and instantly tell you exactly what's going on.

  • Default User Avatar

    I'm with you on that, this is what we might call a "naive" solution: very intuitive, but not always optimal. I haven't done any testing on these solutions but I'm certain the integer division is faster.

    I don't know why it's voted Best Practices, but sometimes that happens on some of the lower-ranked kata. (Nothing against this solution or lower-ranked users, just stating the facts)

    Also welcome! Always glad to see new people getting started with programming.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution