Questions tagged [pset6python]

The tag has no usage guidance.

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
50 views

PSET 6 Similarities no display from log

I am working on the PSET6 more. My code passes the check50, and it displays the comparing table in the website. However, nothing is showing up for the log operations. I have around for answers but I ...
0
votes
0answers
27 views

DNA.py error: 'TypeError: unsupported operand type(s) for *: 'NoneType' and 'int''. It passes all but 2 of the tests

DNA.py is nearly finished, but it is failing the tests with sequence/15.txt and 16.txt. This is the error message: ~/pset6/dna/ $ python dna.py databases/large.csv sequences/16.txt Traceback (most ...
0
votes
0answers
28 views

PSET 6 Python Cash incorrect results

I am convinced that my code is right. Yet I am not getting the right results for the following: :( input of 0.41 yields output of 4 :( input of 0.15 yields output of 2 The code is below: def main(): ...
0
votes
0answers
23 views

How to avoid extra line after the input from user

from cs50 import get_int import sys height = get_int("Height: ") if height > 8 or height < 1: print("invalid input") exit(1) else: for i in range(0, height+1): for j in ...
0
votes
0answers
27 views

How to fix this? I can't use debug50 in python

This is the output when I use debug50 in phyton Traceback (most recent call last): File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/...
0
votes
1answer
147 views

cs50 pset6 dna error while reading two file 8.txt and 9.txt

import sys import csv AATG, GATA, TATC, TCTG, AGATC, GAAA, TCTAG = 1, 1, 1, 1, 1, 1, 1 TTTTTTCT = 1 temp = 0 if int(len(sys.argv)) > 3 or int(len(sys.argv)) < 3: print("Usage: python dna.py ...
0
votes
0answers
164 views

DNA - Counter failing for large CSV

Stuck on CS-50 DNA, my code is able to accurately derived the STR sequence for the small csv files: Alice and Bob, but when passed the large csv files the programs over counts the number of ...
0
votes
0answers
55 views

PSET6 - DNA issue (values just *slightly* off)

I'm truly at a loss here. Seems like I've fully comprehended everything this Pset has thrown at me, yet somehow when I run this code all of my values (for each individual STR) are 1 less than the ...
0
votes
1answer
1k 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
26 views

Help reading this segment of python for Similiarities

i, j = len(s1), len(s2) while True: _, operation = matrix[i][j] if not operation: break if operation == Operation.INSERTED: j -= 1 elif ...
0
votes
1answer
62 views

What is if __name__ == “__main__”: doing in compare pset6?

I read the documentation, but I still can't pinpoint exactly what it is this line of code is doing in compare. The code of compare is as follows: #!/usr/bin/env python3 import argparse import re ...
0
votes
1answer
129 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
15 views

CS50 caesar.py. My program seems logically and syntactically fine, however my encryptions are never correct

import cs50 import sys import string def main(): # checks if there are two arguments if len(sys.argv) != 2: print("Incorrect amount of arguments") return 1 # converts ...
0
votes
1answer
244 views

caesar python 3 using ord and chr - help please

i m trying to use ord and chr, but there is no result at the prompt ? i guess it s something with chr because earlier i was having an error of that ciphertext wasnt an interger, suggesting me to use ...
0
votes
1answer
215 views

vigenere python help

https://pastebin.com/DHEbSYWV help i have been stuck for the last couple of day but i feel like i am really close just need the push in the right direction. mainly for the this question. how do i go ...
0
votes
1answer
157 views

vigenere.py help

please guys i am really stuck, first of i have a question as to how to debug python code. like the debug50. and my second is with my code for vigenere. import cs50 import sys def main(): # make ...