6

Is the problem that you have hardcoded the input file to "banned.txt"? From the specification: Accepts as its sole command-line argument the name (or path) of a dictionary of banned words (i.e., text file). Opens and reads from that file the list of words stored therein, one per line, and stores each in a Python data structure for later access. ...


3

The errors give a very good clue to the problem. Program is "case sensitive" and must be "case insensitive". Perhaps investigate how you can use strcasecmp (as Zamyla mentions in the check walkthrough). From the man page [emphasis added]: The strcasecmp() function compares the two strings s1 and s2, ignoring the case of the characters. It returns an ...


2

Not exactly clear what you're asking in your first question, but I know what you should be asking, so here goes. ;-) The file can't simply be multiplied by some scaling factor. Each line of pixels (excluding the padding) needs to be scaled up. Then, the appropriate number of bytes need to be added to the end of the scaled up line. That last part explains ...


2

To answer your first question, check50 is not available in the Lab. (check50 is not introduced until Week 3 when you will move to the IDE). edit To answer your second question, you are only seeing a score for Scratch because that was submitted in 2018. Your other programs were submitted in 2019, but you used the 2018/x submit50 code. You'll need to ...


2

I tried running your code in the sandbox, resulting in an additional row without any hashes on top of the pyramid (you can see the space between the pyramid and the height prompt). To solve the problem, the first for loop should have i starting at 1 if you're using <=. for (int i = 1; i <= n; i++) Additionally, your second line of hashes have three ...


2

https://cs50.readthedocs.io/faq/cs50x/#i-won-t-be-able-to-finish-the-course-before-31-december-2019-what-will-happen I won’t be able to finish the course before 31 December 2019. What will happen? After 31 December 2019, the course will be updated to a 2020 version. Your progress from 2019 will be carried forward to the 2020 version. After 31 December 2019, ...


2

Yes, your progress from 2019 will carry forward to the 2020 course, but you'll need to complete the course using the 2020 materials. We'll publish transition instructions in January (much like the big yellow box on the front page of the current 2019x course.)


1

If it’s red it means you have not summited all the pset’s so you need to check which pset is marked as unfinished


1

I don't think it's a good idea to add listeners in a callback that way. They can pile up. The empty form does not seem to have one, empty form would submit, and you have no code for removing them later. The problem specification does not even mention key presses, and you could fill the form without a single one (e.g. autocomplete or copy/paste via mouse). ...


1

Can't speak to the user error because I'm not well versed in flask, other than to say that an unused variable is pretty much self-explanatory. But, hopefully, this explanation will make the whole thing moot. As a general security rule, table manipulation at an app level should be completely avoided! Creating a new table for each user transaction, or even ...


1

Your answers is going to be a list of each list of answers (ie, a list of rows). The actual 'title' of those answers isn't in the file. You only need to iterate over each line and then iterate over each item (in the comma separated list). Let's say that someone filled out your form and chose "me, 1, sports, my reasons" for the 4 questions. The next ...


1

Do not include bmp.h, it's not in the directory when compiled by check50. If you need something from that file (e.g. #include <stdint.h> and typedef uint8_t BYTE;), copy it into your recover.c.


1

As per the specification the bottom-left corner of the left-hand pyramid should be left-aligned with the terminal window and therefore the number of preceding spaces should not be hard-coded.


1

You can check your own style by running style50 mario.c You can see the tests used for grading by clicking the check50 button next to your submission on cs50.me/submissions With both of those tools, you should be able to figure out where you've gone wrong.


1

The errors are self explanatory. The code accepts 0 as a valid input, it should reject it. In all the pyramids that the code prints, the first line has two #'s. There should be only one. Is it possible that you're working with last year's pset website? It changed this year. If this answers your question, please click on the check mark to accept. ...


1

Cut and paste error. What is the value of a dime? A nickel? A penny? I'm sure it isn't 25 cents each! ;-) When you get to the point that you're not seeing the forest for the trees, as is the case here, it's always best to take a break and set it aside for at least a couple hours, and not think about it at all. Better to let it sit overnight!


1

Why does the code increment the amount of change, i, each time it subtracts the value of a coin from it? You should be using a separate variable to track the number of coins.


1

You assign the height to variable i, and on the next line you overwrite it with 0, throwing away the user input. Make the row counter a different variable, and name your variables according to their meaning, especially if they are used at any point outside of the loop head, and both height and likely also the row counter (or whatever you want to call it) are....


1

Firstly, the method split returns a list; and as per the line inputList = [input.split()] your're enclosing the returned list within another which yields the nested list. Secondly, you might want to consider revising the line s = line.splitlines() as the method splitlines breaks the string at line boundaries (i.e. \n) which might not what you intended since ...


1

So you decided to make some functions, why not. The function definition would be like return_type function_name(param1_type param1_name, param2_type param2_name, ...) { // body of the function } for example // function apply_discount takes two parameters of type double // and returns a double itself double apply_discount(double price, double ...


1

Answer 1: This is the proper way from the pset page check50 cs50/2018/x/caesar but we are now in 2019 check50 cs50/2019/x/caesar Caeser Pset Page Answer 2: In the picture it shows that you just submitted the pset in 2019 which wont submit Since CS50 intsructed students this way Announcements Hello, world! This is CS50x 2019. New to CS50? Scroll down ...


1

Perhaps revisit the Words example in Lecture 7, which does something similarly using javascript. https://cs50.harvard.edu/college/weeks/7/notes/#words In that Words example: The Python code in application.py uses a jsonify function to return a list as a JSON object: @app.route("/search") def search(): q = request.args.get("q") words = [word for ...


1

The block of code that needs to be changed is as mentioned below after the line 15: save the file name from the command line argument into a variable called banned_text banned_text = argv[1] use the variable name in the below file open command with open(banned_text, "r") as f: With rest of the code as it is, program works absolutely fine:)


1

Have a look at your gradebook. I would expect that you don't have grades for Resize, Recover (both pset3 this year), Homepage (pset5) and the final project. Is that what you are seeing? You will need to complete those.


1

custInt *b = a -> cI; b = malloc(sizeof(custInt)); First line initialises b to a -> cI. Second line discards that value to replace it with the address returned by malloc. To assign to both, you could do custInt *b; b = a -> cI = malloc(sizeof(custInt)); = assignment expression has the value that's assigned, and is evaluated right to ...


1

You're right, there are some substantial changes for 2019. A lot of the first half of the course content has been compressed into less time and some has been removed. However, the latter half of the course has now been expanded and more material added. To complete the course, you need to continue with the 2019 version. You already have credit for the work ...


Only top voted, non community-wiki answers of a minimum length are eligible