2.16. Mixed-up Code Questions

The following program segment should prompt the user for their name, assign a value to greeting, and then say hello using the name. But, the blocks have been mixed up and include extra blocks that aren’t correct.

The following program segment should print the phrase, “Carla loves lemons.”. But, the blocks have been mixed up and include an extra block that isn’t correct.

The following program segment should ask the user their hours per week and pay rate, then print a statement with their gross pay. But, the blocks have been mixed up and includes extra blocks that aren’t correct.

The following program segment should print out the cost for each shirt if they are to buy 2 and get the third free but were originally $45 each.

The following program segment should print out the cost per person for a dinner including the tip. But, the blocks have been mixed up and include an extra block that isn’t needed in the solution.

The following program segment should swap the values of x and y after val1 and val 2 are assigned to x and y, respectively. But, the blocks have been mixed up and include an extra block that isn’t needed in the solution.

The following program segment should print how much you will have to pay for an item that is 60% off the original price of $52.99. But, the blocks have been mixed up and include an extra block that isn’t needed in the solution.

The following program segment should print the phrase, “Baking cookies makes Chris happier than anything else.”. But, the blocks have been mixed up and include several extra blocks that are not correct.

The following program segment should print the phrase, “It takes us 2 hours and 45 minutes to get home from camp.”. But, the blocks have been mixed up and include an extra block that isn’t correct.

The following program segment should print the phrase, “3 + 300 + 7 = 310.”. But, the blocks have been mixed up and include an extra block that isn’t correct. Drag the needed blocks from the left and put them in the correct order on the right. Click the Check Me button to check your solution.

You have attempted of activities on this page