This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-26 10:05:36

happyg01
Scratcher
Registered: 2010-10-27
Posts: 17

help

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

 

#2 2011-08-26 13:46:54

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: help

I'll make ur project a link.. (I sorry for this being offtopic)
Here.


I'm back.
Maybe.

Offline

 

#3 2011-08-26 15:52:41

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: help

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]


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#4 2011-08-26 16:01:22

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: help

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/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]<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


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#5 2011-08-27 00:19:42

happyg01
Scratcher
Registered: 2010-10-27
Posts: 17

Re: help

thanxs for that

Offline

 

#6 2011-08-27 00:42:26

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: help

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/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]<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.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer