
David H. answered 01/29/17
Tutor
5
(18)
Patient & Effective Math/Physics Tutor near Fort Worth
I don't know Python language but here is some thoughts that hopefully help.
int ismult19 = 0 % if mult 19 set to 1 else set to 0
int isgreat200 = 0 %if greater than 200 set to 1 else set to 0
if input > 200 then
isgreat200 = 1
end if
% To check if multiple 19 one thing you can check is if if absolute{input/19-round(input/19)} = 0. I'm eg if input was like 20 then you'd get abs(20/19-round(20/19)) which would be like 1.... Something minus 1 which does not equal 0
if (abs(input/19-round(input/19))) = 0 then
ismult19 = 1 %yes multiple 19
end if
if isgreat200 = 0 and ismult19 = 0 then
print "not greater than 200 not multiple 19"
elseif isgreat200 = 1 and ismult19 = 0
print " not mult 19"
elseif isgreat200 = 0 and ismult19 = 1
print "not great 200"
else
print "good choice"
end if
hope helpful
best - david