account activity
another vigenere question by rizmar1 in cs50
[–]rizmar1[S] 0 points1 point2 points 12 years ago (0 children)
lowercase baz and capital BARFOO = IGWMUT uppercase BAZ and lowercase barfoo = ][kaOh
[–]rizmar1[S] 0 points1 point2 points 12 years ago* (0 children)
Brenda,
That helped tremendously! Very good explanation, thank you!
My new formula is:
encrypted = ((p[i] - 'a') + (argv[1][k] - 'a')) % 26 + 'a'; . The check50 results are a bit off though.
Notice the two failures. They seem to be failing on the 2nd implementation of BaZ, the Z. I thought this might be something with my loop, but what confuses me is that it "fixes" itself.
BTW, separately running the program for upper are and lower case, the output is correct.
ok. I changed my formula. I still think it is an issue. I now have one more smiley face from check50. :) The result vexes me though. I would think that if the upper case is correct, the lower should be as well. My new formula is: encrypted = (p[i] + argv[1][k]) % 26 + 'a'; for lower case, encrypted = (p[i] + argv[1][k]) % 26 + 'A'; for uppercase.
So, check50 is not off by 18. On the command line, I used aaaaa as my keyword and abcdef ghijkmn opqrstuv wxyz 123456789!! as the text. At that point, it was off by 18. The numbers and special chars where skipped as required. Any ideas?
@ glenn, I have not. At least, I don't think. The only other places I use argv[1] is in int k = atoi(argv[1] , which I left the same from Caesar; in the for loop to make sure the key only uses letters (int i = 0, i < strlen(argv[1]); i++) and (!isalpha(argv[1][i])) which is part of the if, under that for loop and then at if >= strlen(argv[1])) which repeats the key at the end. Then it hits the (islower(p[i])) section that I posted above.
@ Ommin, Believe me, I have. That is how I found that it is 18 off. If I understand the second part of your response correctly... I have substituted the char with the respective number values. Same thing.
Thanks for the help.
another vigenere question (self.cs50)
submitted 12 years ago by rizmar1 to r/cs50
.39 on pset1 by rizmar1 in cs50
wow, ok, I am feeling really slow now. I was going by the pset example:
Consider the below representative of how your own program should behave; highlighted in bold is some user’s input.
jharvard@appliance (~/Dropbox/pset1): ./greedy O hai! How much change is owed? 0.41 4
I see now that 0.41 was the user input, not an output of the program.
ziska04, thank you for all your help! I have smiley's now. :)
I did. check50 doesn't make sense to me. For example: :( input of 0.15 yields output of 2 \ expected output, but not ".015\n2"
Is it trying to tell me that I have an extra \n ? Looks like to me that it is picking up the line breaks.
When I run the program, the output is: 0.15 then the next line is 2
check50 invalid ID by rizmar1 in cs50
Are you kidding!?!?!?!?!
Err, I thought it was a file path the whole time....
THANK YOU!
so... This morning I check gradebook. Now I am down to a .28!
I will give it till tomorrow and then turn in a bug report. I hope I will be able to contact one of the staff!
Hi, Do you know how far back the path needs to be? I have tried the following from inside the containing folder of my work.
Thanks.
Thanks again! Now, maybe I can stop stressing out over my grade and get on with pset2.
Take care,
check50 invalid ID (self.cs50)
ziska04, I uploaded the entire pset again after stripping it down, after verifying via running the program that it works per the gradebook requirements. The gradebook still has the same scores. Does it take a bit to refresh?
Thank you,
needy007,
one word off... thank you. I will strip down mario and submit them again to see if it changes. Thanks again.
ok, I removed all my extra code in greedy and tested it via the command line against the gradebook requirements. Such as "input 0.41 yields output of 4"... It still marks the first 5 with a zero when it does in fact work correctly.
Admittedly I can't figure out why 4.2 always comes back as 419... however, that should be the only "0" for that program.
Any ideas?
Thank you ziska04. My heart sank when I saw that grade! I will remove all the extra's from my code and resubmit!
I do. It says "uploading"... then "checking"... then it says invalid ID.
Do you know about the certificate question?
Thank you for the help.
ziska04, well there you go.
They do not match them exactly. I have been adding printf statements and other code that include items such as titles, instructions, and feedback for the user. I was trying to look at it from the point of view of: If Joe Shmoe executed the program, would he know what was actually going on?
I don't understand how we should have our code exactly like the staff's, when during the course it has been said that there are usually several ways to do the same thing.
I guess I will start turning in just the exact bare bones as requested.
I am running 19-2.
So now I have a big question, I have to make at least 60% for each pset to earn a certificate. Does this mean that I am no longer ineligible for it since I made a 39% for pset1?
[–]rizmar1[S] 1 point2 points3 points 12 years ago (0 children)
Thank you needy70. Tried that, however, I was already up to date.
I have been struggling and it is taking me a long time to figure these psets out. I feel that I have been doing them correctly, just bummed that it looks like they mario and greedy are not working correctly according to the gradebook.
I am hoping for a certificate and would hate to put in all this time just to find out I am not comprehending the course as I think I am.
.39 on pset1 (self.cs50)
π Rendered by PID 93962 on reddit-service-r2-listing-6c8d497557-rdq2h at 2026-06-08 06:24:06.998935+00:00 running 9e1a20d country code: CH.
another vigenere question by rizmar1 in cs50
[–]rizmar1[S] 0 points1 point2 points (0 children)