nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

Minor bug in example given in `EP - Basic` page #425

Open EvitanRelta opened 1 year ago

EvitanRelta commented 1 year ago

The below example in EP - Basic should be squareRoot(int s)

image

damithc commented 1 year ago

@EvitanRelta I was about to change it to int but realized it's meant to be a string that represents a number e.g., "4". Otherwise the first partition s is not a valid number doesn't make sense.

EvitanRelta commented 1 year ago

@damithc Hm then I guess the wording could be improved like:

Pre-conditions: s represents a positive integer as a String

and under the EP:

[ s is not a valid integer in String format ]


On a side note, I'm thinking [ s is not a valid number ] should be changed to [ s is not a valid integer ] ?

damithc commented 1 year ago

Good point, @EvitanRelta I've added this to the todo list for the next semester's version of the textbook.