Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Figure 1 : An OUBuild speech bubble containing the text 'The price of an item changes from 36 to 111. What is the price increase

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.

 

imageimage

Programming Languages and Compilation Assignment-1 Regular Expressions Q1) Write a Java program that uses regular expressions to count the number of academic courses in a text file that belong to each of the Computer Science department, Information Systems department, and Engineering department. (You have to enter some academic courses codes in a text file, and then display the number of courses in each department) For example: CSC 340 CEN 341 CSC 113 IS 230 Computer Science department = 2 courses Information Systems department = 1 course Engineering department = 1 course

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Estate Finance and Investments

Authors: William Brueggeman, Jeffrey Fisher

14th edition

73377333, 73377339, 978-0073377339

More Books

Students also viewed these Computer Network questions