Question: Majority rule. Python Programming In Congress, members typically vote electronically. A bill requires a simple majority of Yea votes (more than 50%) to pass. There

Majority rule. Python Programming

In Congress, members typically vote electronically. A bill requires a simple majority of "Yea" votes (more than 50%) to pass. There are 435 members in the House of Representatives and 100 in the Senate. Write a function that declares two parameters: the number of "Yea" votes, and which chamber is voting ("house" or "senate") and returns the value True if the bill received enough votes to pass, and False if it did not. Use your function to write a main() that lets the user enter the vote and reports whether the bill succeeded; use an exception handler to deal with the case that the user types in an invalid number.

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!