Cody

Problem 1072. Television Screen Dimensions

Solution 3857093

Submitted on 26 Nov 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
[W,H]=teledims(2.4,1,46); assert(H == 17.7 && W == 42.5)

W = 32.5269 H = 32.5269

Assertion failed.

2   Fail
[W,H]=teledims(4,3,32); assert(H == 19.2 && W == 25.6)

W = 30.3579 H = 10.1193

Assertion failed.

3   Fail
[W,H]=teledims(3,2,60); assert(H == 33.3 && W == 49.9)

W = 53.6656 H = 26.8328

Assertion failed.

4   Fail
[W,H]=teledims(1.85,1,42); assert(H == 20.0 && W == 36.9)

W = 29.6985 H = 29.6985

Assertion failed.

5   Fail
[W,H]=teledims(3,2,1000); assert(H == 554.7 && W == 832.1)

W = 894.4272 H = 447.2136

Assertion failed.

6   Fail
[W,H]=teledims(16,10,92); assert(H == 48.8 && W == 78.0)

W = 91.5434 H = 9.1543

Assertion failed.

7   Fail
[W,H]=teledims(2.4,1,92); assert(H == 35.4 && W == 84.9)

W = 65.0538 H = 65.0538

Assertion failed.

8   Fail
[W,H]=teledims(16,10,32); assert(H == 17.0 && W == 27.1)

W = 31.8412 H = 3.1841

Assertion failed.

9   Fail
[W,H]=teledims(3,2,82); assert(H == 45.5 && W == 68.2)

W = 73.3430 H = 36.6715

Assertion failed.

10   Fail
[W,H]=teledims(16,10,82); assert(H == 43.5 && W == 69.5)

W = 81.5930 H = 8.1593

Assertion failed.

11   Fail
[W,H]=teledims(16,10,60); assert(H == 31.8 && W == 50.9)

W = 59.7022 H = 5.9702

Assertion failed.

12   Fail
[W,H]=teledims(3,2,92); assert(H == 51.0 && W == 76.5)

W = 82.2873 H = 41.1437

Assertion failed.

13   Fail
[W,H]=teledims(1.85,1,1000); assert(H == 475.5 && W == 879.7)

W = 707.1068 H = 707.1068

Assertion failed.

14   Fail
[W,H]=teledims(2.4,1,42); assert(H == 16.2 && W == 38.8)

W = 29.6985 H = 29.6985

Assertion failed.

15   Fail
[W,H]=teledims(1.85,1,27); assert(H == 12.8 && W == 23.8)

W = 19.0919 H = 19.0919

Assertion failed.

16   Fail
[W,H]=teledims(16,10,82); assert(H == 43.5 && W == 69.5)

W = 81.5930 H = 8.1593

Assertion failed.

17   Fail
[W,H]=teledims(4,3,46); assert(H == 27.6 && W == 36.8)

W = 43.6394 H = 14.5465

Assertion failed.

18   Fail
[W,H]=teledims(2.4,1,60); assert(H == 23.1 && W == 55.4)

W = 42.4264 H = 42.4264

Assertion failed.

19   Fail
[W,H]=teledims(4,3,92); assert(H == 55.2 && W == 73.6)

W = 87.2789 H = 29.0930

Assertion failed.

20   Fail
[W,H]=teledims(1.85,1,60); assert(H == 28.5 && W == 52.8)

W = 42.4264 H = 42.4264

Assertion failed.

Suggested Problems

More from this Author56

Community Treasure Hunt

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

Start Hunting!