Questions tagged [pset6]

The problem set for Week 7

Filter by
Sorted by
Tagged with
0
votes
1answer
972 views

Conditional jump or moves depends on uninitialized values

I am getting the following valerind error. ==9649== Conditional jump or move depends on uninitialised value(s) ==9649== at 0x80493AD: check (dictionary.c:152) ==9649== by 0x8048A6D: main (...
0
votes
1answer
107 views

why check50 is not evaluating corectly for my question

I have tried to approach the question in move simplifir=ed way and i have created an array and declared it globally. my programme is correctly responding to all the asked questions but still I'm not ...
1
vote
1answer
101 views

pset6: check50 weird output and I don't know exactly how to debug

here are all of my functions and the output I don't know exactly what's wrong but I am guessing it's something with either load or indexes cause server1 check50 works fine I tried using gdb to ...
0
votes
1answer
321 views

Undefined reference to log10 in error function

I am trying to compile pset6 it is showing undefined reference to log10 in error function. I re-downloaded the file and compiled the just unzipped file it is showing the same. Further the error ...
1
vote
1answer
88 views

Help with parse

I'm getting two errors with check 50 and am struggling to understand how to go about this. :( Requesting cat.exe returns error code 501 \ expected output, but not "HTTP/1.1 505 HTTP Version Not ...
0
votes
1answer
235 views

pset6 server.c ide50 400 Bad Request

I am doing pset6 (for the second time) and have it all working on the new platform (ide50), however when I load my workspace's domain I get a 400 Bad Request message but otherwise the page loads as it ...
0
votes
1answer
604 views

Lost trying to figure out sentiments PSET 6 2017

I need some help with pset6 I'm basically lost trying to figure out what I should be doing. I have my analyzer code which doesn't return any errors when I run it but at the same time returns no output ...
0
votes
1answer
131 views

pset6 similarities How do I fill the rest of cells in edit distance algorithm?

I have the base cases but I don't know how to access them and compute to choose the better operation and save a tuple in the cells from enum import Enum class Operation(Enum): """Operations""" ...
0
votes
1answer
396 views

How to check if certain token is in the file in analyzer.py

I have implementing (in my understanding) analyzer.py. I am confused after dividing a tweet into tokens how to check them if they are available in "negative" or "positive", my question is "Is there a ...
1
vote
1answer
146 views

Parse wont pass check50

for some reason my code isnt passing: :( Two spaces after GET returns error code & :( Two spaces before HTTP/1.1 returns error code I cant see what would cause that. A previous question indicates ...
0
votes
1answer
69 views

Pset 6 sentiments init function

I'm working on the init function is sentiments and I'm struggling a bit on what to put in the for loop. This is what I have so far, can someone tell me if this is correct or how to fix it? def ...
0
votes
1answer
74 views

Segementation Issue in Pset 6

I am trying to implement Pset6 but I'm having a huge problem with segmentation faults caused by strstr or strchr. The offending lines are printf("OK %s\n", reqLine); tempStr = strstr(reqLine, "HTTP/...
0
votes
1answer
81 views

PSet 6 Parse Function (check50 issue)

I hope you are well! I am currently on pset6 and I am stuck on the parse function. So far I have managed to get check50 to go all but green on a few checks: https://sandbox.cs50.net/checks/...
0
votes
1answer
652 views

pset6 DNA. My code passes all tests but this one: python dna.py databases/large.csv sequences/18.txt

from sys import argv, exit import pandas as pd # Checks if the number of files is correct if len(argv) != 3: print("Usage: python dna.py data.csv sequence.txt") exit(1) # Reads the text file ...
0
votes
1answer
125 views

:( Requesting cat.exe returns error code 501

this is some pain in the neck every single test is passed except :( Requesting cat.exe returns error code 501 can you please help me my brain is a war zone right now here is my code const char* ...
0
votes
1answer
512 views

pset6 similarities help with lines

I've been writing the code for lines and I think i've finally started to figure it out. I'm having some trouble with making the lines into a variable and then comparing them. I'm not sure that this ...
1
vote
1answer
464 views

I am getting "HTTP/1.1 501 Not Implemented" when I run 192.#.#.#:port#/cat.jpg

@curiouskiwi, Thanks a lot....your response helped a lot. I wonder why I missed out such little detail. However guys, I have another problem which I believe am missing out something but can not seem ...
0
votes
1answer
123 views

Pset6: Getting 200 OK response, but cannot upload code to check50

Was wondering if anybody could take a look at my code and find any issues. I ran check50 after implementing lookup and parse, and I passed everything, so I am assuming the problem is in my load and/or ...
0
votes
1answer
233 views

pset 6 dna getting not required output

import sys import csv temp = 0 tempmax = 0 consecutivelist = {} #error checks to make sure they are 2 arguments passed in at command prompt while len(sys.argv) != 3: print("Error: Needs 2 ...
0
votes
1answer
364 views

pset6: problem parsing the request line in server.c

I feel like I'm going in circles trying to parse the request line into its constituents. It looks like method and requesttarget are ok, but I keep getting too many characters for HTTPver. For "GET / ...
0
votes
1answer
248 views

pset6 redirect loop

I can't figure out what is wrong with my code, and I don't know where the issue is. I have tried to figure it out by putting printf calls everywhere, and it appears that my parse function works as ...
0
votes
1answer
232 views

How do I load words in speller that are mixed letters and numbers?

I'm struggling with pset 6 (quite difficult logical and implementation wise, but I like this level of difficulty and this challenge). I'm implementing load and I just found out that I'm 34 words off ...
0
votes
1answer
571 views

pset6 check50 doesn't pass for possessives and substrings properly

I probably almost got my pset6 working. When I run the check50 on it, it says: :( handles possessives properly \ expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 184..." ...
0
votes
2answers
674 views

pset6 lookup returns null

I can't figure out how to even get the / list to show up in the browser. I believe the reason based on printf statements comes from the fact that lookup is returning null. However, when the path is /...
0
votes
1answer
74 views

pset6 - DNA - works for small.csv but not large.csv

import csv import sys with open(sys.argv[1], 'r') as file: # stores data from small.csv in both dict and list form dna_names_dict = csv.DictReader(file) ...
0
votes
1answer
139 views

pset6 count STR in the DNA sequence issues

so i m a bit confused...i have been testing my code using the small database and what i have so far produced what i expected .... more specifically the STRcounts (i marked that part #?????). it is ...
0
votes
1answer
263 views

Problems with Python style (DNA)

https://github.com/me50/Teet1970/blob/bfcf588e64beecae190aee450c5f9e48d7f6bfdc/dna.py I have a serious problem with python style. I got 0.62 for style (dna) and I don't understand, that is wrong. I'm ...
0
votes
2answers
604 views

Can't find cause of segmentation fault in server.c pset6

I need help finding cause of the segmentation fault in my server.c. I've been using gdb line by line for this pset and I finally think I can use it. However, it reports the seg fault at the line 130 ...
0
votes
1answer
100 views

pset6 DNA - range() not working as expected

DNA was a breeze until I got to the part where I have to check the dna sequences for patterns. Regardless of wich file I pass to the program it always detects only 1 repetition for every pattern. ...
0
votes
1answer
44 views

Check does not like my spacing on Mario.sentimental. Is the program unwilling to print ' ' * 0 as no spaces?

I've run this in various configurations, when I remove excess spaces, it still prints out with a space at the beginning of each line. And the center spacing seems to be larger than check50 expects, ...
0
votes
1answer
34 views

PSET6 DNA Why is my (count consecutive substrings in string) function always returns 0's?

I tried writing different function variations but my count_dna function keeps returning zeroes (despite having consecutive sequences of STRs in the dna sequences)--can anyone please tell me why? Note: ...
0
votes
1answer
212 views

Pset6 DNA Not matching to names in the database

The print statements seem to turn out what I hoped for up until trying to compare the STR counts to the database STR counts. I would just appreciate any pointers of where I'm going wrong thanks. ...
0
votes
2answers
25 views

PSET6 Readability "unsupported operand type(s) for *: 'float' and 'NoneType'"

I'm getting "unsupported operand type(s) for *: 'float' and 'NoneType'" error for line 34: "s = (100 / words) * sentences". Not sure what to make of this since count_sentences(text)...
0
votes
1answer
81 views

PSET6 - Double free error

I'm getting stuck in the last lines of PSET6. Apparently the problem is in the LOAD function. Check50 server2 getting all but 1 lines marked red :( and when running the program I get * Error in `./...
0
votes
1answer
27 views

get_string function not working on pset6 2020

here is the problem ~/ $ python hello.py Traceback (most recent call last): File "/home/ubuntu/hello.py", line 1, in <module> answer = Get_string("what is your name") ...
0
votes
1answer
712 views

PSET6 DNA Sumbit50 not matching with usual output

Hello, After a lots of effort I was finally able to implement DNA and it works correctly ! but Submit50 shows correct output for text file (1-5) but incorrect for rest The text file which have ...
0
votes
1answer
149 views

pset6 mario/more - output is seemingly correct, however failing tests

I've just finished mario/more in pset6, however, it does not pass the tests. The actual and expected outputs are identical, so is the expected string. The pyramid also looks identical to the c ...
0
votes
1answer
239 views

PSET 6 DNA: How to get number of repeats for each value of STR's? [SPOILER: Full code]

I have written a code to count the highest number of consecutive repeats of specific DNA substring sequences in a long string of DNA...or so I thought. While my code can correctly count the longest ...
0
votes
1answer
40 views

Starting pset6, sentiments

I'm really not completely understanding how to get started on sentiments. I think I need to load the positive and negative words into the memory of analyze, but I don't really understand how I go ...
1
vote
1answer
771 views

PSET 6 DNA - PROBLEM COUNTING CONSECUTIVE STR SEQUENCES

Im struggling with the PSET6 DNA solution. So far I have opened the dna file and converted it into a dictionary as well as reading the text file. I'm trying to count the consecutive times an STR ...
0
votes
1answer
225 views

Pset 6 DNA: improving efficiency

I've successfully submitted the below code on Pset6 for the DNA problem. But, I know my 'get_longest' function is a horror show as far as efficiency is concerned: I am doing a series of checks that I ...
0
votes
1answer
39 views

Changing directory to vhost

I'm trying to do the basic "hello, world" HTML site in week 7 of CS50, and I don't know how to change my directory. In the example, his directory looks like (~/vhosts/localhost/public) however my ...
0
votes
1answer
21 views

Index to integer

How do i convert an index to an integer? I tried int(index), that didnt work. For example; S = [a,b,c,d] For index in S: n = int(index) print (n) break print ()
0
votes
1answer
70 views

Issue with recording STRs in memory (PSET6 - DNA)

I'm trying to record the number of repetitions of each str in the sequence. I created a dictionary as below and another empty dict because i couldn't update a dict while iterating through it. But for ...
0
votes
1answer
219 views

can't get my readability program to work on all conditions- rounding issue?

My python readability program is not giving me the correct grade level for all of the checkers. specifically: "In my younger and more vulnerable years my father gave me some advice that I've been ...
0
votes
1answer
2k views

CS50 Pset6: cash.py not returning number of coins used for change

Below is my code for pset6 of CS50, in which the user is prompted for an amount of change in the form of a float, which is converted into cents (e.g. 1.25->125), and the fewest coins needed to make ...
0
votes
1answer
37 views

pset6 301 moved permanently error

Here are my implemented functions const char* lookup(const char* path) { char ext[6]; int j = 0; for(int i=0,n=strlen(path);i<n;i++) { if(path[i]=='.') { ext[j] = path[i]; ...
0
votes
2answers
110 views

cs50 pset6 takes too long to run

I am trying to improve my code for pset6, it works but currently takes a few minutes for the larges files. Can I get some help as to how to improve performance? from sys import argv, exit import csv ...
0
votes
1answer
33 views

Using open.readlines, why won't it return the list?

My understanding of this part of sentiments is that I need to open the positive words file and make it all into a list, I thought I could do this with open.readlines, but it isn't working. Can someone ...
0
votes
1answer
53 views

After implementing parse, should all checks be green?

I am working on pset6, after implementing parse(), we are instructed to use check50. check50 2015.fall.pset6.server1 server.c At this point, I haven't done any code for query, load() or indexes(). ...

1
2 3 4 5
17