-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-case-1.txt
78 lines (62 loc) · 1.29 KB
/
test-case-1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import math;
from math import *;
from root.myMath import random;
from math import random, floor;
from math import random => rand;
const myConst = "lorem ipsum";
var myVar : Int = 25, myStr : String;
var myArray : new Array [Double] (4);
const myInitiatedArray = Array (11, 42, 33, 41, 90.25);
class Point implements Movable with Plottable {
private var px: Int, py: Int;
Point (Int px = 0, Int py = 0) {
this.px = px;
this.py = py;
}
Int moveHorizontal (Int step) {
px += step;
return px;
}
}
var point : new Point(1 , 2);
const origin : new Point();
for (myVar = 0; myVar < count && count > 5; myVar++) {
sum += myVar;
}
for (var obj in myList ) {
newList.add (obj.name);
}
while (3 <= 4 || !counter == 3) {
}
do {
} while (false)
if (x2 != y2) {
} elif (true) {
} else {
}
switch (name) {
case "Jan":
print("it’s January");
break;
case "Feb":
case "Dec":
print("close enough");
break;
default:
print("try again");
}
Double divide (Int num1, Int num2) {
var result : Double;
result = num1 / num2;
return result;
}
try {
res = num1 / num2;
}
on DivisionByZeroException catch (err) {
print ("num 2 = 0");
print (err);
}
catch (err) {
print (err, "oops.");
}