-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassignment_1_input_2.json
90 lines (90 loc) · 2.58 KB
/
assignment_1_input_2.json
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
79
80
81
82
83
84
85
86
87
88
89
90
{
"function":"sample-text-function",
"questions":[
{
"instruction":"Hello! I'm Sarah. I'm your algorithms bot."
},
{
"text":"Before starting please tell me your first name",
"var":"first_name"
},
{
"text":"Please tell me your last name",
"var":"last_name"
},
{
"text":"And your gender?",
"options":[
"Male",
"female"
],
"var":"gender"
},
{
"text":"May I know your age?",
"var":"age"
},
{
"conditions":[
[
"age.isdigit() == False"
]
],
"text":"I couldn't quite get how that response can be your age :/ Please enter your valid age.",
"var":"age"
},
{
"instruction":"Congratulations! Registration Successful."
},
{
"calculated_variable":"True",
"formula":"first_name + ' ' + last_name",
"var":"full_name"
},
{
"instruction":"Hello %s , How are you? For a sample of my work I can show you how to make a transpose of a 3X3 matrix.",
"instruction_var":[
"full_name"
]
},
{
"calculated_variable":"True",
"formula":"[]",
"var":"rows"
},
{
"text":"Enter the first row of the matrix(3 integers space seperated).",
"var":"rows[0]"
},
{
"text":"Enter the second row of the matrix(3 integers space seperated).",
"var":"rows[1]"
},
{
"text":"Enter the third row of the matrix(3 integers space seperated).",
"var":"rows[2]"
},
{
"calculated_variable":"True",
"formula":"[map(int, i.split()) for i in rows]",
"var":"matrix"
},
{
"calculated_variable":"True",
"formula":"[[matrix[j][i] for j in xrange(3)] for i in xrange(3)]",
"var":"t_matrix"
},
{
"instruction":"This is the transpose of the input matrix"
},
{
"list_var":"True",
"list_length":"3",
"instruction":"Row %s : %s",
"instruction_var":[
"i+1",
"str(t_matrix[i])"
]
}
]
}