Cody

Problem 44276. Simple spirometer - find your lung capacity from the number and size of soap bubbles in one breath

Solution 3835393

Submitted on 25 Nov 2020 by Dyuman Joshi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
n=10; d=6; assert(spiro(n,d)<365*pi)

2   Pass
n=10; d=6; assert(spiro(n,d)>355*pi)

3   Pass
n=125; d=1; assert(spiro(n,d)<25*pi)

4   Pass
n=120; d=1; assert(spiro(n,d)>19*pi)

5   Pass
n=12; d=1; assert(spiro(n,d)<3*pi)

6   Pass
n=11; d=1; assert(spiro(n,d)>pi)

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!