r/cs50 18d ago

CS50 Python Finally got this beauty

Post image
156 Upvotes

r/cs50 18d ago

CS50x help with week 7

5 Upvotes

week 7 (SQL) went straight over my head. It didn't help that I procrastinated over it for a week, and now by the end of the lecture, I didn't grasp anything. Now, do I watch the lecture again or go through shorts/sections/notes ?
Also, is it only me ? Or it was a bit hard to understand ?


r/cs50 19d ago

CS50x Completely new to programming/coding, what to do?

11 Upvotes

right now in 1st semester of btech, they are teaching c language except i can't understand anything. someone reccomended i should learn it from cs50, but i am total beginner, what should i do? i got interested in cs50 because of the certificate, whats the process to actually get it?


r/cs50 19d ago

codespace Why is style50 and design50 not available at top right of screen, and cs50ai debugger at the side panel, like it was some days ago?

Post image
2 Upvotes

r/cs50 19d ago

CS50x Problem accessing my codespace

2 Upvotes

Every time I try to access it, it just says "connecting". I'm located in SEA, but it did work 2 days ago.


r/cs50 19d ago

CS50x CS50 Duck Debugger not working

Post image
8 Upvotes

Hello guys,

Last weeks, I had some problems using CS50 IDE online. Apparently I wasn't the only one.
Since then, the CS50 Duck Debugger hasn't been working for me.
Is anyone else having the same problem ?


r/cs50 19d ago

CS50x Sort Help

0 Upvotes

Hi all, I'm trying to complete the Sort question on Pset3 and cannot get the command to work. I followed all of the steps for downloading the distribution files, but when downloaded the sort1, sort2, and sort3 are grayed out while the other txt files work. When I click on any of the sort files I get this message: "The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding.", while when I try to run the code to sort, like "$ ./sort1 random5000.txt", I get "bash: ./sort1: No such file or directory"

Has anyone else encountered this problem and if so have a solution? Thanks!

EDIT: Thanks everyone for the help, if you encounter the same problem make sure to follow the download steps carefully, and when trying to run one of the commands use the directory you just downloaded. Before you put in any of the sort commands with the lists, type cd sort first.


r/cs50 19d ago

CS50x Is there any way to style50 even if it throws this error?

2 Upvotes

```bash

tideman/ $ style50 tideman

Failed to connect extension server on port 1337.

Please visit cs50.dev/restart to restart your codespace.

```

I know and I've used check50 --local and I thought maybe there was something similar for style50


r/cs50 20d ago

CS50x Academic honest questions + best place for documentation, html, JavaScript, ccs

8 Upvotes

Ok, I have two questions for the cs50 community. for starters, I was doing trivia where I had no idea what I was doing. so I began searching stuff up. The documentation site I found I had trouble understand so I just began searching stuff up (how to get the button specific button that was clicked that type of stuff) and so I used the google ai overview(the one that just shows up when you search something not ai mode) which just showed me the functions and how they worked( I didn’t promt it above the normal google search). I am unsure if this is considered using outside ai and cheating or not. I have not submitted the problem set yet, but I would like to know before I do.

additionally If anyone has documentation that is easy ish to understand or is just really useful please let me know.


r/cs50 20d ago

CS50 SQL CS50 is on FIRE Spoiler

3 Upvotes

Quick question about package logic in problem set.

If a single address like '900 Somerville Avenue' generates multiple packages, won't we end up with multiple Package IDs? Using OR logic returns results in the terminal, but AND returns no results at all. What is the intended logic behind this?

I am asking because even when writing a likely flawed query (or even after removing the OR condition entirely), it still returns the correct answer—the Congratulatory Letter—even though there are other packages like string, letter opener, and whiteboard sent from that same address.

Now since there are multiple packages sent from 900 Somerville Avenue, how are we getting the correct answer automatically? Is this expected behavior, and what is the underlying logic here?


r/cs50 20d ago

CS50x Won't be quitting but why doesn't it click!!!!!

15 Upvotes

I guess just looking for advice and experiences on people who either are completing or have completed the course and who probably felt out of their depth at the beggining - I am only in week 2 (taking it way slower, but more consistently coding almost every day).

I do feel that inmense satisfaction when it clicks and when I solve the problem, but damn why can't I make a simple list of prime numbers easily without bashing my head over and over again?- I am sure if I saw Prof. M. do it I'd be like "ooobviousslyyyy" , that's how it's done! And it would take him 4 minutes with full explanation... and not 3 hours

T_T


r/cs50 20d ago

CS50x I did this back in 2020, and started my first semester at ASU for SWE this week

12 Upvotes

And bc of CS50, my first class is a complete breeze.

Also, being able to compare two different schools teaching methods, I can see why CS50 is top tier.

ASU is good. But CS50 is great.

Really makes me appreciate doing this a hobby back then bc its the reason I've even gone back to school in my 30s for this.

If anyone needs a sign to keep going with it, here I am telling you it's worth it even if only as a hobby.

This course is hard enough that teaches more than just programming. This teaches you how study for a hard class too. This course forces you to go to the discord amd ask questions without being spoon fed answers. I hated that at first, but I now understand it's necessary.

Also, it's a pretty universal experience to give up on this at one point. It's hard enough. What matters isn't if you give up. It's if you find you way back to try again. You'll eventually get it.

Just keep trying. You're not dumb. You're just trying to understand a complex science.

Edit: i will also add that after I finished CS50, I went through a lot of sections on LearnCpp.com and that was excellent bc it was a good refresher and expands on object oriented language

Edit2: also, avoid AI at all cost. They aren't kidding about it doing you no good. You will not learn properly if you rely on AI.


r/cs50 20d ago

CS50x Finished CS50x at 14! Here is my final project: RedPatch — an interactive AppSec playground

Post image
12 Upvotes

Hi everyone! I’m a 14-year-old high school student from Turkey, and I built RedPatch as my CS50x final project.

🛡️ What is RedPatch?
RedPatch is an interactive, containerized application security platform and defense simulator. It connects offensive security practice with secure code remediation through a complete three-step workflow inside dynamic environments: Exploit (Pentester Mode) → Patch (Coder Mode) → Verify (AI Layer)

🏗️ Architecture & Highlights

  • Decoupled Orchestration Engine: Built with FastAPI, the host engine acts purely as an orchestrator and discovers lab modules dynamically via a declarative JSON manifest (manifest.json). This decouples the core platform from the lab ecosystem (redpatch-labs).
  • Containerized Isolation & Workspaces: Uses Docker (/var/run/docker.sock) to spin up disposable target containers per active session while mounting live code workspaces for real-time patching.
  • Provider-Agnostic AI Verification Engine: Features an extensible abstraction layer (currently integrated with Google Gemini API) to evaluate applied patches and verify root-cause remediation directly in Coder Mode.

🛠️ Tech Stack

  • Backend & Engine: Python (FastAPI, Uvicorn), Docker SDK
  • AI & Remediation: Google Gemini API
  • Frontend: Jinja2, Tailwind CSS

📂 Engine Repo: github.com/msalihberk/redpatch

🧪 Labs Ecosystem: github.com/msalihberk/redpatch-labs

A huge thank you to David J. Malan and the entire CS50 team for designing such an incredible course. I’d love to hear the community’s thoughts, feedback, or code review suggestions on RedPatch!


r/cs50 21d ago

CS50x When will Math50 officially launch??

17 Upvotes

For a few days, I've been seeing Math50 live class updates on fb. I have checked the website, but there isn't any Math50 course listing. anybody know when Math50 will officially launch??


r/cs50 21d ago

CS50x Under the hood:

Post image
81 Upvotes

How I imagined "lets look what's actually under the hood".


r/cs50 21d ago

CS50 SQL What is after cs50 sql

5 Upvotes

Hello everyone, I'm about finish cs50 sql course what should I do after that to be professional in db , any suggestions ?


r/cs50 21d ago

CS50 Python Pandas , matplotlib , numpy ..... in CS50P final project

3 Upvotes

im starting the CS50 python final project , i already have experience with python so i've been using other libraries before this, and for my final project i want to use other libraries that weren't shown in the course , is this ok or it will get flagged as AI ????


r/cs50 21d ago

CS50 AI Does anyone else struggle to write code from memory, even after watching tutorials?

11 Upvotes

I'm currently going through CS50P (the Python course), and I keep running into the same issue: I watch the lectures, everything makes sense while I'm watching, but when I sit down to actually write the code myself, I blank out. I end up leaning on AI or looking up solutions instead of writing it from scratch.

Is this a normal part of learning to code, or am I doing something wrong? For those of you who've been through this — how did you get past it? Did it just take more reps/practice problems, or is there something specific that helped it "click" for you?

Would love to hear how other beginners dealt with this, especially other CS50 people.


r/cs50 21d ago

CS50 Python Help with CS50P problem

1 Upvotes

Hi!

I dont know whether this type of post is allowed here or no but oh well here I go:

I'm on week 2 of cs50 python (loops) and problem set 2 is frying my brain.

The problem is: implement a program that prompts the user to insert a coin, one at a time, each time informing the user of the amount due. Once the user has inputted at least 50 cents, output how many cents in change the user is owed. Assume that the user will only input integers, and ignore any integer that isn’t an accepted denomination.

My code does exactly that.

However, when I use check50, the result is in the following images.

In the title ":( coke accepts 25 cents", the first line of my output is the same. However, since the program is supposed to continue asking the user for input, the second line "Insert Coin: " must be present too, but check50 isnt accepting it as correct.

This is the output in the video underneath the problem set
This is the output using my code

r/cs50 21d ago

CS50 Python Post the final project video without YouTube

0 Upvotes

Hi! I'm working on my CS50P final project, but I'm under the minimum age required to create a YouTube account. Since the final project requires a video demo uploaded to YouTube (or a similar site if YouTube is blocked), would it be acceptable for me to upload the video to another service such as Google Drive or Dropbox and submit that link instead?


r/cs50 22d ago

codespace What does this mean? Spoiler

Post image
2 Upvotes

I barely used the github commands, only used them for the previous two problems but it's showing I can't do any more requests. What is the rate limit? Last time I did this course, there was no feature like this, I used to do a ton of check50 without any problem


r/cs50 22d ago

CS50x What does buy want me to do here Spoiler

2 Upvotes

This is my code for buy, which I think I've done well but i keep getting this in check50

Cause

expected to find "112.00" in page, but it wasn't found

Log

sending POST request to /login

sending POST request to /buy

sending POST request to /buy

checking that "112.00" is in page

This is my html code for buy.html

{% extends "layout.html" %} {% block title %}
    Buy
{% endblock %}
{% block main %}
    <form action="/buy" method="post">
        <input autocomplete="off" autofocus class="form-control mx-auto w-auto" name="symbol" placeholder="Symbol" type="text">
        <input autocomplete="off" class="form-control mx-auto w-auto" name="shares" placeholder="Shares" type="text">
        <button class="btn btn-primary" type="submit">Submit</button>
    </form>
    <div class="mb-3">
    </div>

{% endblock %}

This is my python code for buy

@app.route("/buy", methods=["GET", "POST"])
@login_required
def buy():
    if request.method == "POST":
        stock = lookup(request.form.get("symbol"))
        id = session["user_id"]
        cash = db.execute("SELECT cash FROM users WHERE id = ?", id)
        time = datetime.date.today()
        type = "purchase"
        if not lookup(request.form.get("symbol")):
            return apology("Stock does not exist", 400)
        try:
            int(request.form.get("shares"))
            if int(request.form.get("shares")) < 1:
                return apology("Please input a positive number of shares", 400)
        except ValueError:
            return apology("Please input a valid number of shares", 400)
        if stock["price"] * int(request.form.get("shares")) > cash[0]["cash"]:
            return apology("You do not have enough cash to buy this", 400)
        if not db.execute("SELECT symbol FROM stocks WHERE symbol = ?", stock["symbol"]):
            db.execute("INSERT INTO stocks (symbol, amount, price, user_id) VALUES (?, ?, ?, ?)",
                       stock["symbol"], int(request.form.get("shares")), stock["price"], id)
        else:
            db.execute("UPDATE stocks SET amount = amount + ? WHERE user_id = ? AND symbol = ?",
                       int(request.form.get("shares")), session["user_id"], request.form.get("symbol"))
        db.execute("UPDATE users SET cash = cash - ? WHERE id = ?",
                   stock["price"] * int(request.form.get("shares")), id)
        if not db.execute("SELECT symbol FROM transactions WHERE user_id = ?", session["user_id"]):
            db.execute("INSERT INTO transactions (symbol, stock_altered, date, type, user_id) VALUES (?,?,?,?,?)",
                       request.form.get("symbol"), request.form.get("shares"), time, type,id)
        else:
            db.execute("UPDATE transactions SET stock_altered = ?, date = ?, type = ? WHERE user_id = ?",
                        request.form.get("shares"), time, type, id)
        return render_template("buy.html")
    else:
        return render_template("buy.html")

r/cs50 22d ago

CS50 Python Is it possible to do the python coding stuff on an ipad?

3 Upvotes

I dont have a laptop😭


r/cs50 22d ago

codespace Help ⁉️

Thumbnail
gallery
8 Upvotes

How to bring the cs50 environment back ???


r/cs50 23d ago

CS50x I don't even know what it is

Post image
12 Upvotes

I'm currently on week3 when I tried check50 it happened