Question: Write a Python program (special_sum.py) that calculate a special sum of 4 numbers, all int. The rule for this special sum is as follow: If

Write a Python program (special_sum.py) that calculate a special sum of 4 numbers, all int.

The rule for this special sum is as follow:

If one of the entered numbers is 17, then it does not count towards the sum and the numbers entered after it do not count.

For full credit, you must use function. Your function should have 4 int as parameters, and returns the special sum (as an int). Call this function specialsum and use main program:

if __name__ == "__main__":

as following:

Enter the first number: 1 Enter the second number: 2 Enter the third number: 17 Enter the fourth number: 5 You entered: 1, 2, 17 and 5 The special sum of the entered numbers is: 3

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!