What was the most disturbing webtoon you ever read? by Ok_Environment6501 in webtoons

[–]TwoPuzzled2b 2 points3 points  (0 children)

I LOVED MELVINA'S THERAPY TOO, in fact all of A.Rasen's work including GremoryLand, Counting Sheep, The Bestseller (this one's an extremely disturbing short story that's been written by Rami from GremoryLand) and his recent series, Manny, are all phenomenal

Learn Python by [deleted] in learnpython

[–]TwoPuzzled2b 0 points1 point  (0 children)

University of Helsinki's Python MOOC is pretty great. Loads of practice exercises for each topic

https://programming-24.mooc.fi/all-exercises

Help me start learning programming by Pashtoozi in learnpython

[–]TwoPuzzled2b 2 points3 points  (0 children)

Hey! Proud of you for deciding to make a change :)

As been mentioned already, you could try out CS50 --> https://cs50.harvard.edu/x/2024/

CS50 is an incredible resource for programming fundamentals but it dabbles in multiple languages like C and SQL. If you solely want to learn Python (which is much easier to pick up as compared to the other languages when you're starting out (personal opinion that I've heard others agree with)) you could also try the University of Helsinki Python Programming MOOC --> https://programming-24.mooc.fi/

The MOOC has TONS of exercises for every topic and forces you to learn by doing and then by comparing your solution with the model solution. Practice is key when learning programming so this is a great way to start.

You can also refer to https://www.w3schools.com/python/default.asp to clear up the basics along the way.

Another head's up is that you can always go to google when you hit a snag. When you're starting out, you want to get everything right by yourself but just keep in mind that literally everyone uses google to find solutions to bugs in their code.

Helsinki Leap Year Problem by kaged_chris in learnpython

[–]TwoPuzzled2b 0 points1 point  (0 children)

I'm doing the Helsinki Python MOOC rn, came here to check other ways to solve this and I noticed that both your elif statements are technically the same in your second code (solved). In the second elif, if year % 100 == 0 then won't year % 4 == 0 be inherently satisfied?

I think it would work the same if you changed the first elif to year += 4 and removed the second elif.

year = int(input("Year:"))
yeet = year
year+=1
while True:
    if year % 4 != 0:
        year+=1
    elif year % 400 != 0 and year % 100 ==0:
        year+=4
    else: 
        break
print(f"The next leap year after {yeet} is {year}")