New answers tagged

0 votes

Felipe's Taqueria: output check problem

Actually I found that the main problem with my program was the position of the dollar sign: I put it after the total value whereas it was supposed to be at the front
Grace 's user avatar
  • 25
1 vote

Pset 3: Grocery list, the program ends after one item is inputted

Adding an answer from your updated code to simply explain your updated code Nothing is happening because you didn't call any of the functions. You admit you have some confusion so I'm just going to ...
UpAndAdam's user avatar
  • 1,311
1 vote

Inifinite loop for outdated problem

Adding another answer based on your new code. I'm giong to make some changes in that code and point out my changes with comments. NOTE THIS ANSWER ACTUALLY HAS AN ERROR IN IT WHICH I HAVE DELIBERATELY ...
UpAndAdam's user avatar
  • 1,311
1 vote

Pset 3: Grocery list, the program ends after one item is inputted

you only prompt for input once so it exits after one input.. eventually you have a loop problem. what you are doing isnt making sense. why are you adding x to the list and sorting it whether x is in ...
UpAndAdam's user avatar
  • 1,311
0 votes

PS5: Vanity Plates : Expected exit code 0, not 1 while testing

The solution that worked: def test_is_valid(): assert is_valid("CS50") == True assert is_valid("12313") == False assert is_valid("0asdasfgfdsaf") == False assert ...
theparanormal22's user avatar
0 votes

PS5: Vanity Plates : Expected exit code 0, not 1 while testing

You are missing a return false in your is_valid check for length less than 2 It would be good to have test cases for all the ways a plate could be invalid. You don't check for a letter following ...
UpAndAdam's user avatar
  • 1,311
1 vote

Felipe's Taqueria: output check problem

From the python doc: get(key[, default]) Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError. ...
DinoCoderSaurus's user avatar

Top 50 recent answers are included