Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python >>> final price (35.49, 'OH) 36.2 >>> final price (0.99, 'NM) 1.01 >>> final price (120.01, 'FL') 127.21 Problem 2: sum odds(start, finish) -

image text in transcribed
python
>>> final price (35.49, 'OH) 36.2 >>> final price (0.99, 'NM) 1.01 >>> final price (120.01, 'FL') 127.21 Problem 2: sum odds(start, finish) - sums the odd numbers in range Write a function that is given as input 2 values representing the beginning and ending values of a range. the function sums up only the odd numbers in that range and prints a message about the result: Total: Count: Average: where the slots are replaced by the appropriate calculation. For example, sum_odds(1,3) would produce Total: 4 Count: 2 Average: 2.0 Because the range from 1 up to and including 3 is 1, 2, 3 and the odd numbers in that range are 1 and 3, which totals 4. 2 odd numbers were found so the average is 2.0 If non integers are given as parameters, the function should print: start and finish values must be integers If no odd numbers are found the function should print No odd numbers were found More output examples >>> sum_odds (-5, -10) No odd numbers were found >>> sum_odds (10, 2) No odd numbers were found >>> sum_odds (10, 12) Total: 11 Count: 1 Average: 11.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

=+2. Are you happy to pay a price premium for CSR products?

Answered: 1 week ago

Question

1. Discuss the potential legal issues that relate to training.

Answered: 1 week ago

Question

3. Design a program for preparing for cross-cultural assignments.

Answered: 1 week ago

Question

2. Develop a program for effectively managing diversity.

Answered: 1 week ago