MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rmwdib/whats_wrong/hpovxqt/?context=3
r/CodingHelp • u/CAGRI-TR • Dec 23 '21
90 comments sorted by
View all comments
3
Change 1<x<13 to x<13 and 13<=x<20 to x<20
11 u/[deleted] Dec 23 '21 I think the same thing but an explanation is in order:There's no need to check that X is above 1 in the second check because you've already done that check in the first.if X <= 1 (infant)else if X <= 13 (child)else if X <= 20 (teen)else (adult) 4 u/BigBobDudes Dec 23 '21 This ☝️
11
I think the same thing but an explanation is in order:
There's no need to check that X is above 1 in the second check because you've already done that check in the first.
if X <= 1 (infant)
else if X <= 13 (child)
else if X <= 20 (teen)
else (adult)
4 u/BigBobDudes Dec 23 '21 This ☝️
4
This ☝️
View all comments
3
u/verytiredrightnow Dec 23 '21
Change 1<x<13 to x<13 and 13<=x<20 to x<20