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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started