Questions tagged [pset7]

For problem set 7 (CS50 Finance)

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

PSET 7, Error when executing query: Not an executable object: 'SELECT 1'

When I try to check my songs or movies problem, "Error when executing query: Not an executable object: 'SELECT 1'" comes up. Executing in sqlite3 works fine though, and I have submitted ...
Alexandra Shevchenko's user avatar
0 votes
0 answers
19 views

ModuleNotFoundError: No module named 'validator_collection'

I am facing this issue of "Module Not Found Error" when executing response.py assignment. I have already installed the module via PIP.
Afridi's user avatar
  • 1
0 votes
0 answers
17 views

Week 7 Movies - 13.sql Query Running Forever

Title is a bit of a lie because I didn't sit around for ages waiting to see if the query will end up executing or not. However, I really can't find a reason for why this query would take so long to ...
qwest's user avatar
  • 1
0 votes
1 answer
37 views

cs50x Ps7 Movies 10.sql

On the Pset page it says that the solution must have 3392 rows. I wrote two different solutions, both accepted by check50, with different number of rows. The first one gives 3389 lines: SELECT ...
Nicolò Tiraboschi's user avatar
0 votes
1 answer
33 views

No results hours after submission pset7

I completed pset7 yesterday and submitted it, but there are still no results after 12 hours and my progress has not been updated to show that I have completed week 7. Check50 worked fine, I'm logged ...
Malia's user avatar
  • 1
0 votes
0 answers
38 views

PSet7 Fiftyville: Two possible thieves and accomplices left, can't figure out how to narrow it down further

I've narrowed who the thief and accomplice are down to two choices, but I can't figure out how to narrow it down further (I already have where the thief escaped to). The only tables I haven't used are ...
They think im slow EH's user avatar
0 votes
0 answers
8 views

404 file not found issue when trying to download movies

Every time I attempt to download the movies assignment I get a 404 not found error. At first I figured it might just be something on there end but its been more than a week and I still can't download ...
steven donohoe's user avatar
0 votes
0 answers
27 views

What's wrong with my 13.sql querry? PSET-Movies WEEK 7: SQL

I've been doing this Pset and I've completed all except for the last one. I was trying to figure out why. I think my result is ok because has the correct number of rows and Kevin Bacon doesn't appear ...
AlvaroAndLukeTheCoder's user avatar
0 votes
1 answer
883 views

CS50 Python Problem Set 7 Working 9 to 5 check50 fails

I am attempting to finish the problem set. I have posted the code, and the testing code I've written. The check50 passes my main program, but fails the testing code, I have posted the check50 result ...
Shashidhar Nagaraj's user avatar
0 votes
1 answer
1k views

check50 gives "correct working.py passes all test_working checks expected exit code 0, not 2" when "pytest test_working.py" works

This is CS50XPython - Working 9 to 5 (pset7) - Running the test in the IDE works correctly. Looking up exit code 2, it states the program was interrupted by the user (check50?) I have verified all my ...
tiredoftry's user avatar
0 votes
1 answer
171 views

I can't push refs to github even by force pushing

I am finishing week 7 of CS50x 2022 but there is a problem. I have done both problem sets of week 7, Movies and Fiftyville, and submitted them successfully. But the problem is with creating their ...
Farbod Mirkazemi's user avatar
0 votes
0 answers
28 views

What's wrong in this query?

Why this query outputs just 61 rows instead of more than 185? I 'm trying to do 13.sql SELECT name FROM people WHERE id = (SELECT person_id FROM STARS JOIN people ON people.id = stars.person_id WHERE ...
Mohamed Hassan's user avatar
1 vote
1 answer
62 views

PSET7/SQL Any clues as to why my logic isn't working? (13.sql)

This very nested query is to return names of all the actors that performed on a Kevin Bacon film. Instead it's returning nothing, any ideas are appreciated! Note: I'm yet to implement the part that ...
General Noob's user avatar
0 votes
1 answer
3k views

Fiftyville - please help!

I am quite sure about my answers... but still, check50 doesn't approve my answers... can you please tell me whether my answers are indeed wrong to start thinking about it again cause in my mind I am ...
Danae Philioti's user avatar
0 votes
1 answer
303 views

SQL QUERY MOVIES.DB

I have written the query for 6.sql but it does not work. SELECT AVG(rating) FROM ratings WHERE movie_id = (SELECT id FROM movies WHERE year = 2012); I can do this by using JOIN SELECT AVG(rating) ...
MWD's user avatar
  • 86
0 votes
1 answer
215 views

How does the database ER diagram look like in Pset7 (Fiftyville)?

Pset7 (Fiftyville) DB has 10 tables. It would be much easier to work with them if the entity–relationship model (ER diagram) is presented. Pset description doesn’t have it.
NeMaksym's user avatar
0 votes
1 answer
764 views

Pset 7 Fiftyville

I am quite sure about my answers but check50 keeps saying its incorrect. Im not sure if I am giving the answers in the correct way. For ex. The thief escaped to Heathrow(I think)/ London but I am not ...
Dylan's user avatar
  • 7
0 votes
2 answers
724 views

Fiftyville: Can't find a logical way to find the thief

I have done the appropriate INTERSECTION between the person at the: atm, exiting the parking lot and the person on the first flight out of Fiftyville on the 29th. I am left with two people. I know who ...
Oris's user avatar
  • 1
0 votes
1 answer
124 views

pset7/fiftyville - Some people do not have a passport number

I ran the following query SELECT name, passport_number FROM people ORDER BY name; This was the result name | passport_number Aaron | 9852889341 Abigail | Adam | Alan | 2884243902 Albert | ...
Upanshu Lakhani's user avatar
0 votes
1 answer
48 views

pset7 - buying and selling from index results in duplicate flash's and apologies not being rendered

I passed all the check50 tests and I am working on my personal touch component, which for me is adding buying and selling to index. Everything works except: When more than one stock is sold/bought, ...
Clueless's user avatar
0 votes
1 answer
694 views

pset7 Fifty Ville // not sure how to get the intersect of cases to find the thief

I am currently doing pset7 and I have found most of the clues of who it is but the problem is that I need to use the intersect sql function to find the common name of the thief but I am not sure how. ...
Arsham's user avatar
  • 27
0 votes
1 answer
82 views

DIFFERENCE BETWEEN TWO SQL CODES

I wrote these two codes for SQL pset7 but I'm getting different answers. Can anybody tell me the cause of the difference? SELECT COUNT(title) FROM movies WHERE id = (SELECT movie_id FROM ratings WHERE ...
Olhuwhorlhey's user avatar
0 votes
2 answers
4k views

pset7 movies sql7

I'm doing the pset8 tasks. Currently, I have some issues with sql7. In 7.sql, write a SQL query to list all movies released in 2010 and their ratings, in descending order by rating. For movies with ...
Vladimir Khudokormov's user avatar
0 votes
1 answer
75 views

pset 7 houses passes check 50 but shows the names 4 times

I have a really strange problem here: both import and rooster passes every check in check 50, but if I run Rooster the names on every house appear 4 times. I have no clue about why this is happening, ...
Alejandro Sánchez's user avatar
0 votes
1 answer
58 views

Pset 7 Houses: Import seems to work but check50 doesn´t agree

I am confuse with this one: The program doesn´t return any error when I run it and if I go to the students table the names are there, but check50 says it imports "[]". Am I at least close to ...
Alejandro Sánchez's user avatar
0 votes
3 answers
173 views

accidentally imported data multiple times (pset7 houses)

I was testing the code out and ended up running "python import.py characters.csv" multiple times. Now when I go into sqlite3 and print out the data it's repeated itself 3 times over, once ...
starbvuks's user avatar
2 votes
1 answer
68 views

Students only passing 4/6 the last two showing concatnation error but works locally somebody help

[33mTraceback (most recent call last):[0m [33mFile "roster.py", line 34, in main()[0m [33mFile "roster.py", line 27, in main print(row[0] + " " + row[1]+" "+ ...
Dynamo Denis's user avatar
0 votes
1 answer
55 views

In students its printing all the data correctly but when I try to insert it into db its showing this funny error

File "import.py", line 58, in db.execute("INSERT INTO students (first, middle, last, house, birth) VALUES (name[0], NULL, name[1],house, birth)") File "/usr/local/lib/python3....
Dynamo Denis's user avatar
0 votes
2 answers
162 views

How can I check my number of rows on pset7 movies?

I wanted to check my queries one by one as I am doing them, my 1.sql works fine but how I find out how many rows I am getting?
eduarda gouveia's user avatar
0 votes
1 answer
185 views

PSET7 7.sql Error

The code gives the right amount of rows but is not passing the check50 SELECT movies.title, ratings.rating FROM movies JOIN ratings ON ratings.movie_id = movies.id WHERE year = 2010 ORDER BY title ASC
Maria Macarena Garcia Michel's user avatar
0 votes
2 answers
420 views

pset7 6.sql rounding problem

My code works fine but check50 give me an error because it´s not rounded the same way. :( 6.sql produces correct result expected "7.74", not "7.75" SELECT ROUND(AVG(rating), 2) ...
Maria Macarena Garcia Michel's user avatar
0 votes
1 answer
43 views

7.sql CASE error

I'm getting an error where it says Error: near line 3: near "DESC": syntax error My code is SELECT title, rating FROM movies JOIN ratings ON movies.id = ratings.movie_id WHERE year = 2010 ...
Snow's user avatar
  • 11
0 votes
1 answer
70 views

PSET 7, failing on Luna Lovegood test case even though output looks the same as expected output

Expected Output [{'first': 'Luna', 'middle': None, 'last': 'Lovegood', 'house': 'Ravenclaw', 'birth': 1981}] Actual Output: [{'first': 'Luna', 'middle': 'None', 'last': 'Lovegood', 'house': 'Ravenclaw'...
Anurag Reggie's user avatar
1 vote
1 answer
170 views

Submit50 for pset7 movies loads SQL files but returns "Error when executing query: missing statement"

When I execute: submit50 cs50/problems/2020/x/movies All my SQL files are sent for grading and all come back with the same error: Error when executing query: missing statement I have tried the sql ...
Kelvin Winspinger's user avatar
1 vote
1 answer
1k views

PSET 7 Movies SQL Q9

In 9.sql, write a SQL query to list the names of all people who starred in a movie released in 2004, ordered by birth year. ...Your query should output a table with a single column for the name of ...
Kevin Rodriguez's user avatar
0 votes
1 answer
20 views

Why updating a dictionary is not working?

for row in rowsList: if row['middle'] is None: row['middle'] == "" print("{} {} {}, born {}".format(row['first'], row['middle'], row['last'], row['birth'])) Where ...
Hrvoje T's user avatar
  • 105
0 votes
1 answer
69 views

PSET 7 HOUSES - Syntax error on case function

I'm trying to select the first name and last name and ONLY select the middle name when there is one. The logic of my query makes sense. Every time I am extracting the first name, last name, and birth. ...
Bob's user avatar
  • 5
0 votes
1 answer
84 views

When I run the testing code, it says that movies.db does not exist. How should I fix it?

This is my code in the terminal: cat 1.sql | sqlite3 movies.db This is the output: Error: near line 1: no such table: movies.db
Sparkles the Unicorn's user avatar
1 vote
1 answer
178 views

CS50 Houses : Output is correct in my console but error in check50

I am working on the CS50 course by Harvard EDx. The output for CS50 - Houses is correct in my console. However, check50 which is validates and evaluates the response gives an error. I have checked the ...
Krishnakumar's user avatar
0 votes
1 answer
81 views

Pset7 houses - why does my output prints thrice instead of once?

The code is as follows: for row in students_list: first, middle, last, birth = row["first"], row["middle"], row["last"], row["birth"] print(f"{...
Bryson Ang's user avatar
0 votes
1 answer
398 views

pset7 Q10 Weird Result

The challenge is apparently straightforward: write an SQL query to list the names of all people who have directed a movie that received a rating of at least 9.0. To get from names (which lives in the '...
RandomForestRanger's user avatar
0 votes
2 answers
561 views

PSET 7 movies 5.sql check50 not giving the actual output correctly

the check50 output doesn't match sqlite3 output. the code runs and outputs 10 rows in sqlite3 and DBsqlite but check50 output is different.
Exodus Joel's user avatar
0 votes
1 answer
113 views

How to exclude 'Kevin Bacon's' name from query table?

i have tried to exclude the name from the list but most of the solution aren't doing anything. anyone have idea how to solve. SELECT name FROM movies JOIN stars ON movies.id=stars.movie_id JOIN ...
Exodus Joel's user avatar
0 votes
1 answer
318 views

Pset7 (Movies) 12.sql: Table outputs 96 rows rather than 5 rows

I've been stuck on this for quite some time and did a lot of research on the AND operator in SQL, but no matter how many variations I try I cannot get my table to output just 6 rows, with each row ...
qwert9988's user avatar
0 votes
1 answer
591 views

PSET 7 Movies 12.sql

can someone explain the difference between using IN and "="? Here is my code. When I use IN it runs perfectly but when I use "=" there is no output. Thank you! SELECT title FROM ...
anahop's user avatar
  • 1
0 votes
1 answer
262 views

PSET 7 - 6.sql, terminal just hangs

PSET 7 for 6.sql, Terminal just hangs when I execute it. Can anyone tell me why this wouldn't work? I've tried every variation I could think of (and several I found online) for this and none of them ...
Brandon Zemel's user avatar
0 votes
1 answer
60 views

pset7 houses printing the error message if wrong usage

The commandline argument check in roster.py: A bit strange, I find whatever I am doing I can't get this error message to print, the function will shut down alright, but no error message, I have tried ...
HoopsLoops's user avatar
0 votes
1 answer
183 views

Pset7 Movies Q12: I don't get what's wrong

I can't figure out why my pset7 movies Q12 code isn't working. Can anyone tell me why? Here is my code: SELECT DISTINCT title FROM movies, stars, people WHERE movie_id IN (SELECT movie_id FROM stars ...
Miguel's user avatar
  • 1
0 votes
1 answer
538 views

Misuse of aggregate function CS50 Pset 7 10.sql

I'm stuck on pset7 10.sql, it keeps coming up with a misuse of aggregate function. My code is currently: SELECT name FROM people INNER JOIN directors ON people.id = directors.person_id INNER JOIN ...
s1401988's user avatar
0 votes
1 answer
256 views

CHECK50 Bug in pset7: movies SQL

I have been banging my head on this for an hour and half. Finally finished the pset, uploaded it. Check 50 says: Now, both cs50 ide and DB browser return the correct results, and number of lines for ...
andrewdoeslearn's user avatar

1
2 3 4 5
15