Use the Design Recipe to define a function pulse_rate that has two parameters. The first is the number of seconds a nurse has counted pulses, and the second is the number of pulses counted (both ints). The function should return the pulse rate, pulses/minute, as a float. Don't forget to convert seconds to minutes!  Include a Docstring.(use Python)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.2: Returning A Single Value
Problem 6E
icon
Related questions
Question
Problem 17.  [ 1 point for correctness ]

Use the Design Recipe to define a function pulse_rate that has two parameters. The first is the number of seconds a nurse has counted pulses, and the second is the number of pulses counted (both ints). The function should return the pulse rate, pulses/minute, as a float. Don't forget to convert seconds to minutes!  Include a Docstring.(use Python)

 

For example:

Test Result
print(round(pulse_rate(30,22),1)) 44.0
 

Use this statement to test your pulse_rate function:

assert_equal(round(pulse_rate(30, 22),1),44.0)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr