Question

In: Computer Science

A young child wants to jump over a puddle. The caregiver agrees, but has conditions: “you...

A young child wants to jump over a puddle. The caregiver agrees, but has conditions: “you can jump until you are tired but you cannot jump over the puddle more than 15 times”.

Can someone write this to me in pseudo code and flow chat please thanks


Solutions

Expert Solution

The pseudocode is given below.

This pseudocode allows the child to jump over a puddle with certain conditions.

Set isChildTired to false
Set noOfJumps to 0
While true
        Increment noOfJumps by 1
        Accept input from the child whether he is tired and assign it to isChildTired
        If isChildTired is true
                Exit the loop (Stop Jumping)
        Else
                Proceed with the next statement
        If noOfJumps is greater than or equal to 15
                Exit the loop (Stop Jumping)
        Else
                Proceed with the next statement (No statements follows and so continue with the next iteration of the loop)

The screenshots of the code and flowchart are provided below.


Related Solutions

A child swinging on a swingset with chains of length l wants to swing and jump...
A child swinging on a swingset with chains of length l wants to swing and jump off the swing to get as far as possible. At what angle θ_jump should the child let go of the swing to maximize the landing distance? What is the distance jumped as a function of θ_jump? Results should be functions of θ_jump and variables/parameters which should be introduced as required. Model swinging using simple pendulum and jumping using projectile motion. Note, the child is...
A Motorcycle Jump. You are planning to make a jump with your motorcycle by driving over...
A Motorcycle Jump. You are planning to make a jump with your motorcycle by driving over a ramp that will launch you at an angle of 30.0o with respect to the horizontal. The front edge of the ramp on which you are supposed to land, however, is 25.0 ft lower than the edge of the launch ramp (i.e., your launch height). (a) Assuming a launch speed of 60.0 mph, at what horizontal distance from your launch point should the landing...
A young man tries to relive Evel Knievel's attempt to jump over Snake River Canyon on...
A young man tries to relive Evel Knievel's attempt to jump over Snake River Canyon on a motorcycle. The barrel has a width of L = 400. m, and both edges are at the same height. The height of the launch ramp at one rim of the canyon is h = 8.00 m above the rim, and the angle of the final part of the ramp is 45.0 ° from the horizontal. What is the minimum speed necessary for the...
·       How would you describe your social competence as a young child? Did it change over...
·       How would you describe your social competence as a young child? Did it change over middle childhood? ·       Were you a high or a low status child then? ·       Did you play predominantly with high or low status children? ·       Were you popular? ·       Think of a popular child in your school and an unpopular child (first names only). o    Describe the popular child. Make sure you consider the characteristics that contributed to this child's popularity. § How do...
A young couple has just had their first child and they decide to make deposits into...
A young couple has just had their first child and they decide to make deposits into an investment account on each of their daughter’s birthdays, starting with her first birthday. Assume that the account will earn an interest rate of 4% p.a. The parents deposit $4,000 on their daughter’s first birthday and plan to increase the size of their deposits by 6% every year. Assuming that the parents make the last deposit on their daughter's 18th birthday, the amount available...
Do you believe that a young child should be punished for misbehavior? Why ir why not?...
Do you believe that a young child should be punished for misbehavior? Why ir why not? Consider different types of punishment in your answer.
A company that wants to send data over the Internet has asked you to write a...
A company that wants to send data over the Internet has asked you to write a program that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your application should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10. Then swap the first...
A company that wants to send data over the Internet has asked you to write a...
A company that wants to send data over the Internet has asked you to write a program that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your application should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10. Then swap the first...
The accountant for a company wants you to check over his work as he has never...
The accountant for a company wants you to check over his work as he has never compiled a multi-step income statement before. He provides you with the following partial income statement beginning with operating expenses (NOT income from continuing operations): Net Sales                                                                                                         $4,500,000       Operating Expenses                                                                                         (1,500,000) Operating Income                                                                                            $3,000,000 Depreciation Expense                                                                                           (20,000) Extraordinary loss from tornado, unusual and infrequent                                               (750,000) Cost of Goods sold                                                                                               (170,000) Gain on Translation of foreign currency                                                                     ...
Child Psychologist David Elkind has called today's child the "hurried child." Do you believe that children...
Child Psychologist David Elkind has called today's child the "hurried child." Do you believe that children today are stressed and over scheduled? Why, or why not?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT