Skip to content

Commit 7fa46c6

Browse files
Criado através do Colaboratory
1 parent efea846 commit 7fa46c6

1 file changed

Lines changed: 151 additions & 0 deletions

File tree

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"name": "Desafio 7 de Python - Awari_Data Sciece - Aluno: Marcilio Duarte_Turma_DS38",
7+
"provenance": [],
8+
"authorship_tag": "ABX9TyP+1YmAveHsugizZ7s2pmPu",
9+
"include_colab_link": true
10+
},
11+
"kernelspec": {
12+
"name": "python3",
13+
"display_name": "Python 3"
14+
},
15+
"language_info": {
16+
"name": "python"
17+
}
18+
},
19+
"cells": [
20+
{
21+
"cell_type": "markdown",
22+
"metadata": {
23+
"id": "view-in-github",
24+
"colab_type": "text"
25+
},
26+
"source": [
27+
"<a href=\"https://colab.research.google.com/github/marcilioduarte/br-python-challenges/blob/master/Desafio_7_de_Python_Awari_Data_Sciece_Aluno_Marcilio_Duarte_Turma_DS38.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
28+
]
29+
},
30+
{
31+
"cell_type": "markdown",
32+
"source": [
33+
"![](https://i.imgur.com/YX6UATs.png)"
34+
],
35+
"metadata": {
36+
"id": "6p6QOo884QOI"
37+
}
38+
},
39+
{
40+
"cell_type": "markdown",
41+
"source": [
42+
"# Desafio 7\n",
43+
"Um professor de universidade tem uma turma com os seguintes números de telefones:"
44+
],
45+
"metadata": {
46+
"id": "ic900xT74VZf"
47+
}
48+
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": 1,
52+
"metadata": {
53+
"id": "MZSGneCT4OmF"
54+
},
55+
"outputs": [],
56+
"source": [
57+
"telefones_alunos = ['(873) 810-8267', '(633) 244-7325', '(300) 303-5462', \n",
58+
" '(938) 300-8890', '(429) 264-7427', '(737) 805-2326', \n",
59+
" '(768) 956-8497', '(941) 225-3869', '(203) 606-9463', \n",
60+
" '(294) 430-7720', '(896) 781-5087', '(397) 845-8267', \n",
61+
" '(788) 717-6858', '(419) 734-4188', '(682) 595-3278', \n",
62+
" '(835) 955-1498', '(296) 415-9944', '(897) 932-2512', \n",
63+
" '(263) 415-3893', '(822) 640-8496', '(640) 427-2597', \n",
64+
" '(856) 338-7094', '(807) 554-4076', '(641) 367-5279', \n",
65+
" '(828) 866-0696', '(727) 376-5749', '(921) 948-2244', \n",
66+
" '(964) 710-9625', '(596) 685-1242', '(403) 343-7705', \n",
67+
" '(227) 389-3685', '(264) 372-7298', '(797) 649-3653', \n",
68+
" '(374) 361-3844', '(618) 490-4228', '(987) 803-5550', \n",
69+
" '(228) 976-9699', '(757) 450-9985', '(491) 666-5367',\n",
70+
" ]"
71+
]
72+
},
73+
{
74+
"cell_type": "markdown",
75+
"source": [
76+
"Ele criou um grupo do WhatsApp. No entanto, somente os seguintes números entraram no grupo:"
77+
],
78+
"metadata": {
79+
"id": "Y1HqZuT04kEU"
80+
}
81+
},
82+
{
83+
"cell_type": "code",
84+
"source": [
85+
"entraram_no_grupo = ['(596) 685-1242', '(727) 376-5749', '(987) 803-5550', \n",
86+
" '(633) 244-7325', '(828) 866-0696', '(263) 415-3893', \n",
87+
" '(203) 606-9463', '(296) 415-9944', '(419) 734-4188', \n",
88+
" '(618) 490-4228', '(682) 595-3278', '(938) 300-8890', \n",
89+
" '(264) 372-7298', '(768) 956-8497', '(737) 805-2326', \n",
90+
" '(788) 717-6858', '(228) 976-9699', '(896) 781-5087',\n",
91+
" '(374) 361-3844', '(921) 948-2244', '(807) 554-4076', \n",
92+
" '(822) 640-8496', '(227) 389-3685', '(429) 264-7427', \n",
93+
" '(397) 845-8267']"
94+
],
95+
"metadata": {
96+
"id": "jB6gwIub4qc9"
97+
},
98+
"execution_count": 2,
99+
"outputs": []
100+
},
101+
{
102+
"cell_type": "markdown",
103+
"source": [
104+
"Você seria capaz de criar uma lista dos alunos que ainda não entraram no grupo para que sejam contatados individualmente?"
105+
],
106+
"metadata": {
107+
"id": "e0VxCfgA43qC"
108+
}
109+
},
110+
{
111+
"cell_type": "code",
112+
"source": [
113+
"from pprint import pprint\n",
114+
"alunos = set(telefones_alunos)\n",
115+
"alunos_grupo = set(entraram_no_grupo)\n",
116+
"alunos_fora_grupo = sorted(list(alunos.difference(alunos_grupo)))\n",
117+
"pprint(alunos_fora_grupo)"
118+
],
119+
"metadata": {
120+
"colab": {
121+
"base_uri": "https://localhost:8080/"
122+
},
123+
"id": "IzvGkMlT46fM",
124+
"outputId": "28bdb93a-5ced-45d1-e17f-8f399097e42b"
125+
},
126+
"execution_count": 6,
127+
"outputs": [
128+
{
129+
"output_type": "stream",
130+
"name": "stdout",
131+
"text": [
132+
"['(294) 430-7720',\n",
133+
" '(300) 303-5462',\n",
134+
" '(403) 343-7705',\n",
135+
" '(491) 666-5367',\n",
136+
" '(640) 427-2597',\n",
137+
" '(641) 367-5279',\n",
138+
" '(757) 450-9985',\n",
139+
" '(797) 649-3653',\n",
140+
" '(835) 955-1498',\n",
141+
" '(856) 338-7094',\n",
142+
" '(873) 810-8267',\n",
143+
" '(897) 932-2512',\n",
144+
" '(941) 225-3869',\n",
145+
" '(964) 710-9625']\n"
146+
]
147+
}
148+
]
149+
}
150+
]
151+
}

0 commit comments

Comments
 (0)