Figure 1 : An OUBuild speech bubble containing the text 'The price of an item changes from
Question:
Figure 1 : An OUBuild speech bubble containing the text 'The price of an item changes from 36 to 111. What is the price increase in ?'
Both numbers should be whole numbers chosen at random. The first number (36, in the above example) should be between1 and 100inclusive. The second number (111, in the above example) should be between the first number and 200inclusive.
It is expected that the user enters a number without a sign, for example '65'.
If the user gets the answer correct they should be told'Right'and the spider should perform a 'happy-spider jig' to congratulate them. If they get the answer incorrect, they should be told so and given the correct answer, for example'Wrong. The price increase is 75', and the spider should perform a 'sad-spider shuffle' in commiseration.
Your program should use the following:
the custom blockhappy_spider_jigto make the spider perform the happy-spider jig. You should not change the definition of this block.
a custom blocksad_spider_shufflethat you should create and define, to make the spider perform a sad-spider shuffle. There is no strict specification for this, but your block should involve the following:
- the sprite wearing costume spider3
- playing some form of music or sound, which you should bring into the project using any of the 'New sound:' facilities available in the Sounds pane
- the sprite gliding, via aglide[]secs_to_x:[]y:[]block, from side to side several times.
We encourage you to design an algorithm before starting to create your program, and to test your program; however, for this question you are not required to submit anything other than the complete program.
Be sure to test your program in situations where the user gets the answer correct and in situations where they get the answer incorrect.
Marks will be awarded for the following:
a.Forming and displaying an appropriate price calculation question.
Real Estate Finance and Investments
ISBN: 978-0073377339
14th edition
Authors: William Brueggeman, Jeffrey Fisher