How do I make this flag on line 5/6 run properly? How do I make this script keep running until the flag "-1" is entered, and then print("End of employeeID list")? I've attached pictures of my code, and then the consol running the code so you can see how its running. Here is my code so far: 1. def getBonus(salary, bonusPercentage): 2. bonusAmount = salary * bonusPercentage 3. return bonusAmount 4. employeeID = (input("Please enter employeeID: " )) 5. if (employeeID)==-1: 6. print("End of employeeID list")
How do I make this flag on line 5/6 run properly? How do I make this script keep running until the flag "-1" is entered, and then print("End of employeeID list")?
I've attached pictures of my code, and then the consol running the code so you can see how its running.
Here is my code so far:
1. def getBonus(salary, bonusPercentage):
2. bonusAmount = salary * bonusPercentage
3. return bonusAmount
4. employeeID = (input("Please enter employeeID: " ))
5. if (employeeID)==-1:
6. print("End of employeeID list")
7. salary = float(input("Please enter your salary: "))
8. bonusPercentage = float(input("Please enter bonusPercentage: "))
9. bonusAmount = getBonus(salary, bonusPercentage)
10. print("Bonus amount is " , bonusAmount)
![](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F747bcbce-75e1-4e92-9e2a-47ec3f8f8205%2F25565c8a-992b-44a5-93ee-804c12a40dd4%2F0lrwe8i.jpeg&w=3840&q=75)
![](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F747bcbce-75e1-4e92-9e2a-47ec3f8f8205%2F25565c8a-992b-44a5-93ee-804c12a40dd4%2Fcsvigq.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)