Question: Create a RURPLE program that will print out the result of adding numbers together. The numbers will be specified by dropping beepers into the world.

 Create a RURPLE program that will print out the result of

Create a RURPLE program that will print out the result of adding numbers together. The numbers will be specified by dropping beepers into the world. Each stack of beepers represents one digit in a number. The numbers will be on each row of the world. There will be no blank rows. There will never be any beepers in the left most column (the one where the robot starts). For example, here is a world with five numbers in it: 1 2 3 4 5 6 7 8 9 10 Avenue The robot would need to figure out what each number was, and display the result using a print command. In this world, the result would be 18+37+2+30+12, for a total of 99 Requirements Create a defined command that will add up the total number of beepers on the robot's current row. The command should return the value of the number on that row. The general approach should be to move all the way to the far wall, and start picking up beepers on the right end of the number. Those beepers are the ones digits, so each beeper counts as just 1. The next digit to the left counts as the tens, then the one hundreds, etc. Keep going until you get back to the left wall. This will require some thought about your coding, and about using variables. We will go through the concepts of the algorithm in class, but you will have to fill in the details and code it yourself Call that defined command for each row, adding the result to a running total. At the end, print out the running total

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!