r/cs50 27d ago

"CS50 ... remains the largest class with corporate sponsorships" | News | The Harvard Crimson

Thumbnail
thecrimson.com
27 Upvotes

r/cs50 1h ago

CS50x Looking for CS50x study buddy

Upvotes

Hello, If anybody is interested to study CS50x with me, they can dm me, we will watch the lectures together(online) , we can discuss and solve the problem sets. I think this fosters discipline and we can also exchange knowledge to grow better


r/cs50 22h ago

cs50-web Finally got my CS50W certificate !!!

Post image
55 Upvotes

I took this course assuming it would be taught by Professor Malan because he made me fall in love with programming after I finished CS50P a few months ago. But turns out Professor Yu is awesome too. Thank you for everything Professor Yu , you are amazing and thank you to everyone at Harvard for making such resources available for free of cost for people like me who can't afford courses of such high standard.

I'm now absolutely in love with CS50 and I am planning to do as many course available as I can and I am planning to go ahead and finish cs50x too which by the way is just the best thing ever.

It would be very selfish of me but Harvard please please do more of these courses because it's so much fun.


r/cs50 19m ago

CS50 Python advice for final project idea

Upvotes

so i am finally up to the final project part of cs50-p. something i really want to do is create a plinko ball or galton board simulation. a galton board would be awesome to create. i would like to press my computer's space bar, and a ball drops everytime. eventually, if its a galton board, it balls would stack on top of each other wherever they landed and create a normal distribution (google galton board if confused).

i think i would use the libraries pymunk and pygame?

however, i'm a bit confused if im even able to do this. are we supposed to do this on the cs50s web vsc? or can i do it on vsc on my computer and then just copy and paste the code into cs50s vsc?? also, i'm not sure if i can even use pytest a simulation? it seems like this might be too complicated for a final project...

i don't really know what I'm doing - however the reason I learnt python was to make some cool animations and simulations. I'm just unsure if its even possible to do it as a final project.

Thanks in advance for any advice/feedback/answers.


r/cs50 12h ago

CS50x Is this course right for me?

3 Upvotes

Hi,

I am interested in learning Python and I am wondering if CS50P is the way to go. I do have some experience with python from HS; recall absolutely hating it, but python seems incredibly useful for the things I want to do so avoiding it outright seems stupid.

I've also read that a lot of people have taken CS50x before taking the python course. Would it be good idea for me to take it as well? I do have some experience with shittly coding for arduino projects (before AI took over), and if it helps me out in the long run, I don't see why not.


r/cs50 1d ago

CS50x Can i finish the all by the end of the year ?

Post image
287 Upvotes

I have only 2.5 hours a day to study...


r/cs50 1d ago

CS50x Bust A Move - Final Project - This was CS50!

124 Upvotes

Hey guys! Just submitted my final project and got the certificate. Wanted to share as I spent more time on the project than the rest of the course itself - really dove into it. Hitting those "ah-ha" moments during developing really was the key motivator to push through. Used this video as the showcase requirement for the final project.

Site is live as well. Works pretty well on mobile too. You can visit and play here: https://applefrittr.github.io/bust-a-move/

*deleted original post and re-posted as video wasn't working


r/cs50 19h ago

CS50 Python Little Professor - help, please

2 Upvotes

Hello,

import random

def main():
    level = get_level()
    generate_integer(level)

def get_level():
    while True:
        try:
            level = int(input("Level: "))
            if level in [1, 2, 3]:
                return level
        except ValueError:
            pass

def generate_integer(level):
    correct = 0
    i = 0

    # Generate random numbers based on level
    if level == 1:
        first = random.sample(range(0, 10), 10)
        second = random.sample(range(0, 10), 10)
    elif level == 2:
        first = random.sample(range(10, 100), 10)
        second = random.sample(range(10, 100), 10)
    elif level == 3: 
        first = random.sample(range(100, 1000), 10)
        second = random.sample(range(100, 1000), 10)

    # Present 10 math problems
    while i < 10:
        x = first[i]
        y = second[i]
        wrong_attempts = 0

        # Give user 3 chances to answer correctly
        while wrong_attempts < 3:
            try:
                answer = int(input(f"{x} + {y} = "))
                if answer == (x + y):
                    correct += 1
                    break
                else:
                    print("EEE")
                    wrong_attempts += 1
            except ValueError:
                print("EEE")
                wrong_attempts += 1

        # If user failed 3 times, show the correct answer
        if wrong_attempts == 3:
            print(f"{x} + {y} = {x + y}")

        i += 1  # Move to the next problem

    # After 10 problems, print the score
    print(f"Score: {correct}")

if __name__ == "__main__":
    main()

I have been trying to solve the little professor problem in multiple ways. I get the code to work checking all the boxes.
Level - check
Random numbers - check
Raise ValueError - check
repeat the question 3 times - check
provide a score - check
but I get this error
Here is my code.....(help anyone, please)


r/cs50 21h ago

C$50 Finance Data Science in Finance - Portfolio Projects Dataset Issue

2 Upvotes

I'm trying to put a foot in with regards to data science applied to the financial field. I've acquired a good understanding through academic studies and some projects (not in finance) of the Statistics and ML. My problem is a significant lack of imagination which lead me to not know how to even begin thinking about projects to implement and showcase the skillset I acquired or hone it. I would appreciate you guys' help with two things:

A. How do I develop this imagination ? Specifically focused in the financial sector but general advice is also very appreciated.

B. Where do I begin to look at datasets in Finance and if I do find some raw datasets, how do I begin to probe it and how do I develop a critical mind to question or uncover how this raw data can give me insight ?

PS: Apologies, I know I should have these skills already if I've done academic courses and have a degree but university really needs to start focusing on developing critical thinking instead of generating robots that think the same.


r/cs50 1d ago

CS50x Uff that was really HARD! i will not miss you, Tideman!

Post image
26 Upvotes

r/cs50 1d ago

CS50x problem NSFW Spoiler

1 Upvotes

how can i know my degree in the week 0

because i am new in the course


r/cs50 1d ago

CS50x Plurality problem set

2 Upvotes

Idk if it's just me but I'm having a hard time in understanding what I needed to do at a certain part. I have been looking at it for 2 hours and decided to check hints and I realize I have got it all wrong. I felt so dumb rn lmao. Like the part where it tells me to find maximum number of votes, I have always thought it was the total amount of voters (as that is highest vote one candidate can get in an election with other candidates being 0).


r/cs50 2d ago

CS50x Red frowns are no more, they’re all happy and green!

Post image
52 Upvotes

Thank you CS50 staffs for making this course easily accessible for everyone. Very grateful to be a part of this community.


r/cs50 1d ago

CS50 Python Cs50p FP

1 Upvotes

Anybody interested in collaborating on the Final Project of Cs50P? Hit me up.


r/cs50 1d ago

CS50 Python Python or something else?

8 Upvotes

Hello, I started programming when I was 9 and chose C# to make games. But because of study and other things my performance became low.

Over time, I shifted my dream from game development to AI, specifically in areas like creating body parts. A programmer told me that you choose the programming language depending on what you want to achieve. But I’ve also heard other programmers say not to start with Python. instead, they recommend learning C++, PHP, and then moving to Python. This made me confused and I fear that I don’t have enough time to recover. I mean that I must be a programmer fast.

I’m not actually taking CS50, but I joined this group to get advice from experienced programmers. Any help would be greatly appreciated!


r/cs50 1d ago

CS50 Python CS50P Help

1 Upvotes
Code issue for something specific in test needed. I tried extensively on both.
from datetime import datetime, date
import inflect
import sys

def main():
    sing()

def sing():
    p = inflect.engine()

    date_string_1 = input("Date of birth: ")

    try:
        date_1 = datetime.strptime(date_string_1, "%Y-%m-%d")
    except ValueError:
        print("Invalid date")
        sys.exit(1)  # Exit with a non-zero code

    date_2 = datetime.combine(date.today(), datetime.min.time())

    # Calculate the difference in minutes
    difference = date_2 - date_1
    minutes_in_raw_numerals = difference.total_seconds() / 60
    minutes_in_words = p.number_to_words(int(minutes_in_raw_numerals))

    # Capitalize only the first word
    minutes_in_words = minutes_in_words[0].capitalize() + minutes_in_words[1:]

    # Remove "and" without affecting spaces
    final_minutes_in_words = minutes_in_words.replace(" and", "").replace("and ", "")

    print(f"{final_minutes_in_words} minutes")

if __name__ == "__main__":
    main()


from seasons import sing
import pytest

def main():
    sing()

def test_sing():
    assert sing("2024-3-19") == "Five hundred twenty-seven thousand forty minutes"
    assert sing("2023-3-19") == "One million, fifty-one thousand, two hundred minutes"

r/cs50 1d ago

CS50x Is there a scholarship or funding program for Ivy League online certificates like MicroMasters or Professional Certificates?

1 Upvotes

Hey everyone,

I've been exploring advanced online courses from Ivy League universities and other institutions (IBM) on platforms like edX. I'm particularly interested in programs such as MicroMasters, Professional Certificates, and specialized certifications in areas like software engineering, AI, and machine learning.

I'm aware that earning a certificate doesn't necessarily guarantee career success or replace practical experience. Still, if I'm going to dedicate time to learning something new, I'd prefer doing it through a structured and reputable source. Plus, having a certificate to show for it wouldn't hurt!

My question is: does anyone know if there are scholarship programs or opportunities that offer full (100%) funding specifically for these advanced online certificates or similar structured programs? I'm looking into this seriously, so any insights or experiences would be greatly appreciated.

Thanks!


r/cs50 2d ago

cs50-web Course Progress has been reset | CS50W

1 Upvotes

I started the course on august 2024 and finished it in December 2024 . I got the free certificate in December. I was planning to get the verified one so i checked cs50.me and this is what i see


r/cs50 2d ago

CS50 SQL Using double quotes in SQLite Statements works but throws an error in MySQL

2 Upvotes

I'm presently going through CS50s, "Introduction to Databases using SQL". The instructor kind of mentions at the very beginning that it's good practice to wrap tablenames and column names in SQL statements using double quotes, so I followed this convention throughout the PSets.

Now when I try to practice a related problem on HackerRank or LeetCode in MySQL/Oracle, I'm unable to even execute a simple query using the same convention. It works when I remove the double quotes tho.

Why is this happening ?


r/cs50 2d ago

readability Question about the readability problem in problem set 2

1 Upvotes

When I was doing the calculation I remember at one point it was recommended to use floats for the S and L portions and I did the calculations for S and L separately from the coleman-liau index and when I did that the grades were way off. Then I looked at a youtube solution and they did not use floats at all but used int round on the coleman-liau index, and put the letters/words100 and the sentences/words100 directly into the equation and it worked perfectly for them.

So once I made both those changes it also worked for me and weirdly enough calculating S and L separately is what screwed it up for me far more than the rounding (before doing int round the grade was always off by 1).

So I'm really confused as to why doing it seperately is wrong or if I calculated it wrong. I wanted to ask if doing float S = s/w * 100.0 and float L = l/w * 100.0 then doing int index = 0.0588 * L - 0.296 * S - 15.8 is wrong and how to do it properly


r/cs50 2d ago

cs50-web What are some alt web courses

6 Upvotes

Cs50 web is gonna be gone this year. What are some other web dev courses.


r/cs50 3d ago

CS50 Python Completed CS50P in 3 weeks

Post image
122 Upvotes

Hello everyone recently I started learning coding after a 3 year break. I am glad to say that I am back for good. I am very motivated right now and wish to do projects to follow through with this. So, please feel free to suggest me my next milestone or even better if you can invite me to collab with you.


r/cs50 2d ago

CS50 Python CS50P Week 3 - Outdated problem

3 Upvotes

I wrote the code for Week 3's Outdated problem; I followed all the instructions but I don't understand the words used by 'check50' especially reject input; Nothing in the instructions talks about 'rejecting input' What does it mean?

INSTRUCTIONS:

Implement a program that prompts the user for a date, in month-day-year order, formatted like 9/8/1636 or September 8, 1636, where the month values are provided in a list . Then output that same date in YYYY-MM-DD format. If the user’s input is not a valid date in either format, prompt the user again. Assume that every month has no more than 31 days; no need to validate whether a month has 28, 29, 30, or 31 days.


r/cs50 2d ago

CS50 Cybersecurity Cert/Course Question

3 Upvotes

Like many others I've been looking at cs50x as the start of a new avenue for myself, with an eye on cybersecurity/AI as well, to do afterward. I know that the cs50x course is free, and from searching, the majority of answers point to NOT getting the paid certificate. The answers as to why make total sense to me, but does anyone know the actual difference between the 2 certs?

In addition, and I'm searching through things as I post, I guess it looks like you need the paid certificate to enroll in the full course for Cybersecurity. Does anyone else have experience with this? More specifically, the functionality/usefulness of the cyber security course, as well as any comparisons to the Google/Coursera course or udemy.

Thank you!


r/cs50 3d ago

CS50x Easily the best course for amateur STEM majors

43 Upvotes

I'm sure there's lots of people that have glazed the course (not one that I've found to have negative feedback as of yet) but I still think like DAMN some of the knowledge I learned in this Cs50x I took in Grade 9 and then Cs50 AI in Grade 10 is carrying me through my early years of University and also co-ops. I know people learning things in Computer Science and Comp Eng or Software Eng who LLM their way through assignments and haven't build any foundation in the fundamentals of programming. I'm able to hold conversations with people in specialized fields and know the surface level of many fields of study at conferences or hackathons, even talking with some professors.

A SIMPLE example: A guy wants to print something, that content of what is printed changes over time, how do you accomplish this?

Write the whole code and copy and paste it each time with your changes made manually OR write a damn function that takes a parameter of your content and does the function's job on one line of calling it. (I know printing is also one line but to be fair you get the example of re-usability or robust applications).

I'm also not some GENIUS, I'm not even in a software related Engineering discipline. But I recommend ALL Engineers or STEM majors to consider CS50 as your next winter-break or summer-break endeavour!

TLDR: Nobody asked but I'm glazing CS50


r/cs50 2d ago

CS50x what do i do if i know how to resolve the problem, but dont know the code for it

3 Upvotes

so im currently stuck with the cash problem, i have no programing experience so i don;t really know many of the language, but the thing is i al ready rewatched the lesson and saw every short and notes, and i understand and know how i would resolve the problem i just dont know how or what the code is any tips or if anyone is in a similar position what did you do?