Cody

Solution 2169412

Submitted on 22 Mar 2020
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   Fail
x = 0.5; y_correct = 11; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test1 (line 3) assert(isequal(spiral_ratio(x),y_correct))

2   Fail
x = 0.4; y_correct = 31; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test2 (line 3) assert(isequal(spiral_ratio(x),y_correct))

3   Fail
x = 0.3; y_correct = 49; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test3 (line 3) assert(isequal(spiral_ratio(x),y_correct))

4   Fail
x = 0.25; y_correct = 99; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test4 (line 3) assert(isequal(spiral_ratio(x),y_correct))

5   Fail
x = 0.2; y_correct = 309; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test5 (line 3) assert(isequal(spiral_ratio(x),y_correct))

6   Fail
x = 0.15; y_correct = 981; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test6 (line 3) assert(isequal(spiral_ratio(x),y_correct))

7   Fail
x = 0.14; y_correct = 1883; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test7 (line 3) assert(isequal(spiral_ratio(x),y_correct))

8   Fail
x = 0.13; y_correct = 3593; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test8 (line 3) assert(isequal(spiral_ratio(x),y_correct))

9   Fail
x = 0.12; y_correct = 6523; assert(isequal(spiral_ratio(x),y_correct))

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test9 (line 3) assert(isequal(spiral_ratio(x),y_correct))

10   Fail
x = 0.11; y_correct = 12201; assert(isequal(spiral_ratio(x),y_correct)) %% Solution of Project Euler 58 with x=0.1

total = 7 total = 2.3333 total = 1.4000 total = 1 total = 0.7778 total = 0.6364 total = 0.5385 total = 0.5333 total = 0.5294 total = 0.5263 total = 0.5238 total = 0.5217 total = 0.5200 total = 0.5185 total = 0.5172 total = 0.5161 total = 0.5152 total = 0.5143 total = 0.5135 total = 0.5128 total = 0.5122 total = 0.5116 total = 0.5111 total = 0.5106 total = 0.5102 total = 0.5098 total = 0.5094 total = 0.5091 total = 0.5088 total = 0.5085 total = 0.5082 total = 0.5079 total = 0.5077 total = 0.5075 total = 0.5072 total = 0.5070 total = 0.5068 total = 0.5067 total = 0.5065 total = 0.5063 total = 0.5062 total = 0.5060 total = 0.5059 total = 0.5057 total = 0.5056 total = 0.5055 total = 0.5054 total = 0.4947 total = 0.4845 total = 0.4848 total = 0.4851 total = 0.4757 total = 0.4762 total = 0.4766 total = 0.4771 total = 0.4775 total = 0.4690 total = 0.4696 total = 0.4701 total = 0.4706 total = 0.4711 total = 0.4715 total = 0.4720 total = 0.4646 total = 0.4651 total = 0.4656 total = 0.4662 total = 0.4667 total = 0.4672 total = 0.4676 total = 0.4681 total = 0.4685 total = 0.4621 total = 0.4626 total = 0.4631 total = 0.4636 total = 0.4641 total = 0.4645 total = 0.4650 total = 0.4654 total = 0.4658 total = 0.4663 total = 0.4667 total = 0.4611 total = 0.4615 total = 0.4620 total = 0.4624 total = 0.4629 total = 0.4576 total = 0.4525 total = 0.4530 total = 0.4481 total = 0.4486 total = 0.4492 total = 0.4444 total = 0.4450 total = 0.4404 total = 0.4410 total = 0.4365 total = 0.4372

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test10 (line 3) assert(isequal(spiral_ratio(x),y_correct))