-
Notifications
You must be signed in to change notification settings - Fork 3
/
questions.json
217 lines (217 loc) · 5.49 KB
/
questions.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[
{
"question": "Quem inventou a linguagem de programa\u00e7\u00e3o Python ?",
"correct_option": 3,
"options": [
"Rasmus Lerdorf",
"Yukihiro Matsumoto",
"Brendan Eich",
"Guido van Rossum"
]
},
{
"question": "print(type(1/2))\nO ser\u00E1 impresso? python vers\u00E3o 3.x",
"correct_option": 2,
"options": [
"<type 'int'>",
"<type 'number'>",
"<type 'float'>",
"<type 'double'>"
]
},
{
"question": "print(\"%5f\" % 5), o que ser\u00E1 impresso ?",
"correct_option": 0,
"options": [
"5.000000",
"5.000",
"5",
"5.00"
]
},
{
"question": "L = list(range(101))\ndel L[1:99]\nprint(L), o que ser\u00E1 impresso?",
"correct_option": 2,
"options": [
"[0, 99, 101]",
"[1, 99, 100]",
"[0, 99, 100]",
"[1, 99, 101]"
]
},
{
"question": "tupla = (\"a\", [\"b\", \"c\", \"d\"])\nprint(len(tupla)), qual valor ser\u00E1 impresso ?",
"correct_option": 2,
"options": [
"4",
"3",
"2"
]
},
{
"question": "t = \"um tigre, dois tigres, tr\u00EAs tigres\"\nprint(t.count(\"tigre\"), t.count(\"tigres\")), quais valores ser\u00E3o impressos ?",
"correct_option": 3,
"options": [
"1, 2",
"1 2",
"3, 2",
"3 2"
]
},
{
"question": "umter\u00E7o = \"\\u2153\"\numter\u00E7o.isdigit(), retorna True ou False ?",
"correct_option": 1,
"options": [
"True",
"False"
]
},
{
"question": "\"X{0:^10}X\".format(\"123\"), o que ser\u00E1 impresso ?",
"correct_option": 2,
"options": [
"'X '123' X'",
"X 123 X",
"'X 123 X'"
]
},
{
"question": "import os\nos.makedirs(\"av\u00F4/pai/filho\"), o que acontecer\u00E1 ?",
"correct_option": 1,
"options": [
"Ser\u00E3o criadas 3 pastas: av\u00F4, pai e filho",
"Ser\u00E3o criadas 3 pastas: pasta filho dentro da pasta pai dentro da pasta av\u00F4.",
"Ser\u00E1 criada uma pasta com o nome \"av\u00F4/pai/filho\""
]
},
{
"question": "from datetime import datetime, date, time\nd = date(2005, 7, 14)\nt = time(12, 30)\nprint(datetime.combine(d, t)), o que ser\u00E1 impresso ?",
"correct_option": 0,
"options": [
"2005-07-14 12:30:00",
"2005-07-14",
"12:30:00",
"2005-07-1412:30:00"
]
},
{
"question": "from datetime import datetime\ndt = datetime.strptime(\"21/11/06 16:30\", \"%d/%m/%y %H:%M\")\nprint(dt.strftime(\"%A, %d. %B %Y %I:%M%p\")), o que ser\u00E1 impresso ?",
"correct_option": 1,
"options": [
"2006-11-21 16:30:00",
"Tuesday, 21. November 2006 04:30PM",
"2006-11-21 04:30PM",
"Tuesday, 21. November 2006 16:30"
]
},
{
"question": "from datetime import timedelta\nano = timedelta(days=365)\nquinze_anos = 15 * ano\nprint(quinze_anos), o que ser\u00E1 impresso ?",
"correct_option": 3,
"options": [
"5475",
"15 years, 0:00:00",
"3650 days, 0:00:00",
"5475 days, 0:00:00"
]
},
{
"question": "Qual banco de dados \u00E9 n\u00E3o-relacional ?",
"correct_option": 2,
"options": [
"MySQL",
"PostgreSQL",
"MongoDB",
"SQLite"
]
},
{
"question": "x = \"foo \"\ny = 2\nprint(x + y)\no que ser\u00E1 impresso?",
"correct_option": 3,
"options": [
"foo",
"foo foo",
"foo 2",
"Uma exce\u00E7\u00E3o \u00E9 lan\u00E7ada"
]
},
{
"question": "name = \"snow storm\"\nname[5] = 'X'\nprint(name)\no que ser\u00E1 impresso ?",
"correct_option": 3,
"options": [
"snow storm",
"snowXstorm",
"snow Xtorm",
"ERROR, o c\u00F3digo n\u00E3o executa!"
]
},
{
"question": "O que faz o c\u00F3digo abaixo?\nsys.path.append('/root/mods')",
"correct_option": 1,
"options": [
"Muda o local que o execut\u00E1vel \u00E9 executado a partir python",
"Adiciona um novo diret\u00F3rio para procurar m\u00F3dulos python que s\u00E3o importados",
"Altera o local onde os sub-processos s\u00E3o procurados depois que eles s\u00E3o lan\u00E7ados",
"ERROR, o c\u00F3digo n\u00E3o executa!"
]
},
{
"question": "names = ['Ramesh', 'Rajesh', 'Roger', 'Ivan', 'Nico']\nQuais das seguintes instru\u00E7\u00F5es de impress\u00E3o ir\u00E1 imprimir todos os nomes da lista em uma linha separada?",
"correct_option": 0,
"options": [
"print(\"\\n\".join(names))",
"print(names.join(\"\\n\"))",
"print names.join(\"%s\\n\", names)",
"print(names.append(\"\\n\"))"
]
},
{
"question": "foo = {}\nprint(type(foo))\no que ser\u00E1 impresso?",
"correct_option": 2,
"options": [
"set",
"list",
"dict",
"tuple"
]
},
{
"question": "names = ['Amir', 'Barry', 'Chales', 'Dao']\nprint(names[-1][-1])\no que ser\u00E1 impresso?",
"correct_option": 3,
"options": [
"A",
"r",
"Amir",
"o"
]
},
{
"question": "a = [1,2,3,None,(),[],]\nprint(len(a))\no que ser\u00E1 impresso?",
"correct_option": 1,
"options": [
"4",
"6",
"5",
"7"
]
},
{
"question": "nums = set([1,1,2,3,3,3,4])\nprint(len(nums))\no que ser\u00E1 impresso?",
"correct_option": 0,
"options": [
"4",
"2",
"5",
"7"
]
},
{
"question": "x = sum(range(5))\nprint(x)\no que ser\u00E1 impresso?",
"correct_option": 3,
"options": [
"4",
"3",
"5",
"10"
]
}
]