Newest Questions
13,589 questions
0
votes
1
answer
4
views
mario more in c - help!
Down below my code. I'm able to print the left part of the pyramid but the right part doesn't come up. What do I do wrong?
#include <stdio.h>
#include <cs50.h>
#include <stdio.h>
#...
0
votes
1
answer
34
views
CS50P "Lines of code"
Assignment: "file called lines.py, implement a program that expects exactly one command-line argument, the name (or path) of a Python file, and outputs the number of lines of code in that file, ...
0
votes
1
answer
10
views
"Correct numb3rs.py passes all tests" not checked in the check50: numb3rs.py cs50
I am implementing the code for IPv4numb3rs problem. The code works as expected and the test code too but I don't get why the the "correct nub3rs.py passes all test_numb3rs.py check" isn't ...
0
votes
1
answer
14
views
cs50p lines.py not passing the last 3 tests
from sys import argv,exit
def main():
try:
if len(argv) < 2:
exit("Too few command-line arguments")
elif len(argv) > 2:
exit("Too many ...
0
votes
0
answers
12
views
i have an error in debug50
When i try to debugging my code with debug50 it gives me this message even though it compiled (The preLaunchTask 'C/C++: gcc build active file' terminated with exit code -1.) + it happens in some ...
0
votes
0
answers
13
views
Code doesn't consider more than one digit numbers: numb3rs code
This is my code for the numb3rs.py assignment in cs50. Initially it was working well but when I lunched check50, it showed red for certain numbers. With time it started displaying an error when ...
0
votes
1
answer
6
views
Project0 P2 Raise exception
I have 2 questions: 1. Can I invoke a function within the definition of another function? Since to define result() we need to check it's which player's move, I feel the need to use player() here.
2. ...
0
votes
1
answer
8
views
General Doubt regaring CS50 Course
I knew that, CS50 provides the course completion certificate after we complete any course of CS50 by submitting all the assignments and projects provided with atleast 70% score.
Is this same policy ...
0
votes
0
answers
14
views
pls! why ai made bool alternate = false and alternate != alternate and it can just make true instead of false
bool luhn_algorithm(long number)
{
int sum = 0;
bool alternate = false;
while (number > 0)
{
int digit = number % 10;
if (alternate)
{
digit *= ...
0
votes
2
answers
32
views
PLEASE HELP!!! STUCK ON SPELLER FOR MORE THAN A MONTH NOW
Link to post on Reddit
I started working on the pset last month, coded all the required functions (at least I thought I did) and check50 surprised the #&*# out of me, none of the checks were ...
0
votes
0
answers
10
views
"failed to connect extension server on port 1337" this is the message that is displayed when I try to use debug50 or style50
also during the lectures, I can see David's codespace having like 2 buttons on the upper right that are called design50 and style50 that aren't showing in my codespace
"I,ve already tried to ...
0
votes
0
answers
29
views
pset1 cs50ai: tic-tac-toe, TypeError: 'NoneType' object is not subscriptable error at minimax function
I am stuck at implementing the minimax function with alpha-beta pruning. This is were I'm at:
def minimax(board):
_, value = best_move(board)
if value == None:
return None
else:
...
0
votes
1
answer
8
views
Unable to generate GUI in cs50-customized IDE (Offline, Local with VS Code, Docker Container)
I've been using the offline version of CS50.dev (in VS Code with docker container, offline, as instructed in the cs50 documentation). It is really convenient and I enjoy it.
However, when I want to ...
0
votes
2
answers
34
views
cs50 pset 1 credit.c not outputting correct answers in certain random(?) cases
My code works fine for most of cs50's checks except all AMEX card type checks and some VISA type checks where it just outputs INVALID instead of the actual answer.
#include <cs50.h>
#include <...
-1
votes
3
answers
26
views
My convert function is broken and not passing tests but my program seems to do what i think it should
def main():
time= input("What time is it?: ")
hour, min= time.split(":")
if "a.m." in time:
Min, t= min.split(" ")
if 7 <= ...
0
votes
1
answer
10
views
When trying to implement the blur function in pset4, the image ends up blurred, but with odd star shapes in the middle of the image
void blur(int height, int width, RGBTRIPLE image[height][width])
{
RGBTRIPLE copy[height][width];
// Declares a copy of the array, so that the blurred pixels aren't affected by already blurred ...
1
vote
1
answer
27
views
scourgify cs50 'cleans long csv file' check
Here is the code for the scourgify problems in cs50 python. The last check ingicates an error which I am pretty sure refers to the additional blank line of the before.csv file which was provided. How ...
0
votes
1
answer
13
views
CS50 bash permission denied error
I keep getting the bash: Permission denied error. Do you know how I can fix this? Thank you.
0
votes
1
answer
24
views
unit tests test_twttr check50 results
I don't understand the check50 results for the test code for the twttr program and don't know how to fix it. The code is supposed to strip off vowels from a string and return the string without any ...
0
votes
1
answer
25
views
Code for problem set one, Credit not working
I have completed the other set one problems, and wanted to test myself with "Credit". I read through the problem and walk through and wrote code that I believed would work. I tested the code ...
0
votes
0
answers
13
views
PSET 9 Finance checking that "56.00" is in page: my solution
I spent 3 days working on this problem. I followed all of the advice I found on this site:
pset7 finance check50 doesn't detect a valid sale despite portfolio updating correctly
pset8 finance ...
1
vote
1
answer
9
views
filter.c (more comfortable) -- rgb values only slightly too large
I'm working on filter.c and the AI duck says my logic looks right, but I keep failing the check50 tests (except for the upper left corner).
I think it's a small addition problem, because my errors are ...
0
votes
0
answers
9
views
For finance, does anyone know how why it says my database file doesn't exist?
I haven't even touched this part of the code or the file it claims doesn't exist. I'm very confused and would be eternally grateful if someone could let me know why this is happening.
0
votes
0
answers
5
views
My cs50.dev console didn't set up properly
I went to set up my cs50.dev workspace, but it didn't set up properly. normally you would tell the terminal something like:
check50 cs50/problems...
but that doesn't work for me. I also checked the ...
0
votes
0
answers
5
views
How do I access my directory?
trying to help one of my students, but her directory keeps showing this (see photo). We can't run/compile any programs.
0
votes
0
answers
7
views
Error: Codespace Running in Recovery Mode After VS Code Update - 'Rebuild Container' not helping
Description of Issue:
I have been trying to write in VS Code but every time I open it after the recent update, the following error message pops up:
This codespace is currently running in recovery mode ...
1
vote
1
answer
24
views
Finance - "Expected to find "112.00" in page", but the Website Functions Properly
I have been stuck on this line of check50 for a while and I have no idea how to fix it. I added all the features and tried to fix some of the common mistakes others had made that prompted this but I'm ...
0
votes
1
answer
17
views
CS50P - Seasons of Love output issues
I am unable to fix this error while running the program, kindly find the error S
0
votes
1
answer
89
views
Why is it not possible to print a `string` returned by this function?
In the assignments Caesar and Substitution of Problem Set 2 of the CS50 course, students often attempt to create a separate function which enciphers the plaintext and returns the ciphertext as a ...
0
votes
0
answers
16
views
CS50 Tideman : sort_pairs
sort_pairs is not returning successfully when I check the code. Can anyone help point me in the right direction? I spent quite a while on the previous functions getting them correct as I've been away ...