Cody

Solution 1814649

Submitted on 14 May 2019 by Paul Smits
  • Size: 316
  • This is the leading solution.
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
filetext = fileread('bridgeProb.m'); assert(isempty(strfind(filetext, 'assert'))) assert(isempty(strfind(filetext, 'echo')))

2   Pass
x = [3 10]; assert(and( ge(bridgeProb(x), 0.43) , le(bridgeProb(x), 0.45)))

y = 0.4457 y = 0.4457

3   Pass
x = [8 5]; assert(and( ge(bridgeProb(x), 0.00) , le(bridgeProb(x), 0.01)))

y = 0.0030 y = 0.0030

4   Pass
x = [10 5]; assert(and( ge(bridgeProb(x), 0.00) , le(bridgeProb(x), 0.01)))

y = 0.0014 y = 0.0014

5   Pass
x = [8 15]; assert(and( ge(bridgeProb(x), 0.10) , le(bridgeProb(x), 0.12)))

y = 0.1120 y = 0.1120

6   Pass
x = [8 17]; assert(and( ge(bridgeProb(x), 0.15) , le(bridgeProb(x), 0.17)))

y = 0.1613 y = 0.1613

7   Pass
x = [10 35]; assert(and( ge(bridgeProb(x), 0.60) , le(bridgeProb(x), 0.62)))

y = 0.6126 y = 0.6126

8   Pass
x = [10 35]; assert(and( ge(bridgeProb(x), 0.60) , le(bridgeProb(x), 0.62)))

y = 0.6126 y = 0.6126

9   Pass
x = [10 40]; assert(and( ge(bridgeProb(x), 0.78) , le(bridgeProb(x), 0.80)))

y = 0.7907 y = 0.7907

10   Pass
x = [7 20]; assert(and( ge(bridgeProb(x), 0.35) , le(bridgeProb(x), 0.37)))

y = 0.3630 y = 0.3630

11   Pass
x = [8 25]; assert(and( ge(bridgeProb(x), 0.45) , le(bridgeProb(x), 0.47)))

y = 0.4608 y = 0.4608

12   Pass
x = [8 10]; assert(and( ge(bridgeProb(x), 0.01) , le(bridgeProb(x), 0.03)))

y = 0.0285 y = 0.0285

13   Pass
x = [9 15]; assert(and( ge(bridgeProb(x), 0.06) , le(bridgeProb(x), 0.08)))

y = 0.0773 y = 0.0773