Questions tagged [compare]
The compare tag has no usage guidance.
8
questions
0
votes
0answers
43 views
DNA works with most names except Alice and Albus
I really don't undersrtand why this is happening. I'm trying to finish DNA for pset6. Since more elegant methods were too difficult for me, I decided to compare all values in STR one by one against ...
0
votes
2answers
22 views
Problem in C programming about condition
Well, I am learning C programming.Today I faced a problem while coding. I have made a string variable named,"answer". But when I wrote a condition, I found an error message but I don't know ...
1
vote
1answer
16 views
How does compare2.c work?
I'm just watching lecture 3 right now and I can't understand how is compare_strings works.
It has for loop that comparing if i < n and n = strlen(a), so if i'm passing name like David strlen(a) ...
0
votes
1answer
93 views
PSET 6 [Similarities - less] How is the compare file accessed in this problem since it is not imported to application.py
(Dont be intimidated by length of code chunks, I included all of my guess as to what's going on, so most of it is just stuff to skim over)
The folder similarities contains static and template folders ...
0
votes
1answer
63 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
284 views
Similarities Pset6 - submit button not working
Quick question. My code passes check50 and submit50 but for whatever reason I can't seem to get the actual program to work i.e. when I click the compare button on my form nothing happens. Here is my ...
0
votes
1answer
63 views
how do i compare the result of an fread to a hex value?
fread(&quad, sizeof(FIRSTFOUR), 1, inptr);
so I get the first four bytes (FIRSTFOUR is a struct with four BYTES defined first, second, third, fourth)
but how do I compare quad.first to oxff, etc???...
0
votes
1answer
204 views
Comparing chars
I'm trying to write some code that will take input, loop through the characters in the input, and print "hi" for every "a" that shows up in the input.
I'm getting errors trying to compare the looped ...