swsnu / swppfall2019

31 stars 22 forks source link

[HW1] Printing format in run.py / Form validation requirments for numbers #40

Open jang1suh opened 5 years ago

jang1suh commented 5 years ago

1)

For python assignment, README.md requires run.py show the following result for the given file:

$ python solution/run.py baby1994.html
Common popular babynames in 1994 (Count: 85)
Common babyname: male rank, female rank
Addison: 554, 800
Adrian: 98, 834
Alex: 50, 581
Alexis: 227, 18
Ali: 461, 674
Angel: 104, 176
Ariel: 480, 144
Ashley: 957, 2
...

I found that original codes for printing results in run.py just prints resulting tuples, thereby give me the following result:

...
('Addison', '554', '800')
('Adrian', '98', '834')
('Alex', '50', '581')
('Alexis', '227', '18')
('Ali', '461', '674')
...

Should I change codes for printing results so that printing format matches the format in README.md?

2)

For javascript assignment, Age field and Year field regard numbers in some ranges as valid inputs. Does it mean a number that is not an integer can be regarded as valid if it is in required range? For example, 0.5 is a real number between 0 and 200, so it passes my current form checker when given as an input for Age field, but I doubt if it makes sense to regard 0.5 as a valid age value.

hy00nc commented 5 years ago
  1. The printing results must match the one in README.md. If you parse and append data appropriately to common_names in the skeleton, the printing result should look the same with the README.md.

  2. It would make more sense to exclude the floating values for those fields, but since the specification just mentioned the range of numbers so as long as it falls into the range it may be valid. But I won't test with floating values for grading.

jang1suh commented 5 years ago

Thank you very much! :)