pencil code

Skip to first unread message

Nov 21, 2019, 2:12:24 PM11/21/19
to Pencil Code
my 7 th grade daughter has keycode and i am unable to help her, however i am slowly learning as she does her homework.
but # 51  says zoe getting basket ball shoes for 40 percent off, of the price of 200.
she has to write code to figure the answer. i know that that is about 80 bucks off which would mean she paid 120 however me being new to pencil code i could not
help her write a code to do this. can someone help me, help my daughter with this.
Message has been deleted
Message has been deleted

Dec 10, 2019, 11:39:52 AM12/10/19
to Pencil Code
Perhaps this will work?

#40% off sale 
discount_rate = 0.40

original_price = 200

sale_price = original_price*(1-discount_rate)

write "The sale price is " + sale_price + "."
Reply all
Reply to author
0 new messages