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

Using Python 3.

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. This means that there needs to be input function for yes votes in the House and yes votes for the Senate. In total if yes votes for both are more than 268, the bill passes (True) and if it has less than 268 it does not (False) 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!