"… and if they have eggs, get a dozen, " she added.
He later came home with 12 gallons of milk.
“Why’d you get so much milk!?!” his wife asked.
He replies, “THEY HAD EGGS!”
"… and if they have eggs, get a dozen, " she added.
He later came home with 12 gallons of milk.
“Why’d you get so much milk!?!” his wife asked.
He replies, “THEY HAD EGGS!”
So get a gallon of milk, and IF they have eggs, get a dozen (gallons of milk). Basically this is an if statement meaning if X is true, do this. Well normally we think get a dozen would be get 12 eggs, but because “have eggs = true” that meant get 12 gallons of milk. The opposite would’ve been eggs=false and he’d come home with 1 gallon.
I’m not a Dev so I can’t write the code better, but I understand the language enough
eggs?(milk=12):(milk=1);
return milk;
Ahh, my bad. I forgot that in English dozen means 12 but dosens means 10*n with n > 1.
people say tens for multiples of 10
NP. We don’t even use dosens in America so I learned something new!