Needing Help!

Joined
Mar 12, 2022
Messages
1
Reaction score
0
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.


it keep repeating what am I doing wrong?
Screenshot 2022-03-12 165610.jpg
 
Joined
Mar 3, 2021
Messages
241
Reaction score
30
First, you're comparisons on lines 17 and 19, to L and R, need to have quotes around those letters. Second, you need to get the user input again at the end of the loop. Just copy line 11 to the bottom of the loop and it should work just fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top