Question: In this lab, you add a loop and the statements that make up the loop body to a Python program. When completed, the program should

In this lab, you add a loop and the statements that make up the loop body to a Python program. When completed, the program should calculate two totals: the number of left-handed people and the number of right-handed people in your class. Your loop should execute until the user enters the character X instead of a L for left-handed or a R for right-handed. The inputs for this program are as follows: R, R, R, L, L, L, R, L, R, R, L, X. Note that variables have been assigned for you, and the input and output statements have been written for you.

Instructions

Make sure the file LeftOrRight.py is selected and open.

Write a loop and a loop body that allows you to calculate a total of left-handed and a total of right-handed people in your class.

Execute the program using the "Run Code" bottom at the bottom of the screen. Input the data listed above and verify that the output is correct.

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!