can any1 pls help me
there something wrong with my codes.
part a - If some1 has a LC and spend over $20 they get 50% off
part b - If some1 doesn't have a LC but spend over $20 they get 20% off
part c - If some1 has a LC but spends $20 or less they get 30% off
the codes seems to work well seperatly, and part b works well with the other 2 plans but when I add part a or part c with each other they seem to fail.
here my work
http://scratch.mit.edu/projects/happyg01/1997764
Offline
happyg01 wrote:
can any1 pls help me
there something wrong with my codes.
part a - If some1 has a LC and spend over $20 they get 50% off
part b - If some1 doesn't have a LC but spend over $20 they get 20% off
part c - If some1 has a LC but spends $20 or less they get 30% off
the codes seems to work well seperatly, and part b works well with the other 2 plans but when I add part a or part c with each other they seem to fail.
here my work
http://scratch.mit.edu/projects/happyg01/1997764
What you might want to do is add a part d.
It would be:
part d- if some1 doesn't have an LC and spends <$20, they get 0% off
Code it like this:
[blocks]http://scratch.mit.edu/forums/post.php?tid=72896&qid=892019#req_message><(<{ LC }> <=> yes )><broadcast[ Yes<else><broadcast[ no
<when I receive[ Yes <if><(<{ total }> <>>20 )><change{ total }by( (( 1 <*>0.5 ))<else><change{ total }by( (( 1 <*> 0.3 ))
<when I receive[ no <if><(<{ total }> <>>20 )><change{ total }by( (( 1 <*>0.2 )) [/blocks]
Offline
SJRCS_011 wrote:
happyg01 wrote:
can any1 pls help me
there something wrong with my codes.
part a - If some1 has a LC and spend over $20 they get 50% off
part b - If some1 doesn't have a LC but spend over $20 they get 20% off
part c - If some1 has a LC but spends $20 or less they get 30% off
the codes seems to work well seperatly, and part b works well with the other 2 plans but when I add part a or part c with each other they seem to fail.
here my work
http://scratch.mit.edu/projects/happyg01/1997764What you might want to do is add a part d.
It would be:
part d- if some1 doesn't have an LC and spends <$20, they get 0% off
Code it like this:
[blocks]<if><(<{LC }> <=> yes )><broadcast[ Yes <else><broadcast[ no
<when I receive[ Yes <if><(<{total }> >20 )><change{total }by( (( 1 <*>0.5 ))<else><change{ total }by( (( 1 <*> 0.3 ))
<when I receive[ no <if><(<{total }> > 20 )><change{total }by( (( 1 <*>0.2 ))[/blocks]
Sorry about that. it should be the above
Offline
SJRCS_011 wrote:
SJRCS_011 wrote:
happyg01 wrote:
can any1 pls help me
there something wrong with my codes.
part a - If some1 has a LC and spend over $20 they get 50% off
part b - If some1 doesn't have a LC but spend over $20 they get 20% off
part c - If some1 has a LC but spends $20 or less they get 30% off
the codes seems to work well seperatly, and part b works well with the other 2 plans but when I add part a or part c with each other they seem to fail.
here my work
http://scratch.mit.edu/projects/happyg01/1997764What you might want to do is add a part d.
It would be:
part d- if some1 doesn't have an LC and spends <$20, they get 0% off
Code it like this:
[blocks]<if><(<{LC }> <=> yes )><broadcast[ Yes <else><broadcast[ no
<when I receive[ Yes <if><(<{total }> >20 )><change{total }by( (( 1 <*>0.5 ))<else><change{ total }by( (( 1 <*> 0.3 ))
<when I receive[ no <if><(<{total }> > 20 )><change{total }by( (( 1 <*>0.2 ))[/blocks]Sorry about that. it should be the above
XD do not put in blocks. I would just post a project showing your solution and giving the person in need of help the link to it on another one of your accounts or your main one. Those Scratch post blocks are VERY hard to understand I would assume.
Offline