Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions Desafio_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/WittmannF/br-data-science/blob/master/python/challenges/Desafio_1.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/armandocesar/br-python-challenges/blob/master/Desafio_01.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "SbLLE9q1eldC",
"colab_type": "text"
"id": "SbLLE9q1eldC"
},
"source": [
"### Desafio 1\n",
Expand All @@ -53,8 +52,11 @@
"cell_type": "code",
"metadata": {
"id": "WhtbdwFseldD",
"colab_type": "code",
"colab": {}
"outputId": "d2820d87-d682-4199-a6e2-b0140be0005a",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
}
},
"source": [
"palavras = [\n",
Expand All @@ -65,23 +67,37 @@
"]\n",
"\n",
"\n",
"# Seu código"
"# Seu código\n",
"word_count={}\n",
"for word in palavras:\n",
" if word in word_count:\n",
" word_count[word] += 1\n",
" else:\n",
" word_count[word] = 1\n",
"\n",
"print(word_count)"
],
"execution_count": 0,
"outputs": []
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"text": [
"{'red': 4, 'green': 4, 'black': 5, 'pink': 6, 'white': 5, 'eyes': 1, 'orange': 4}\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "M58o1U9KfAxa",
"colab_type": "code",
"colab": {}
"id": "M58o1U9KfAxa"
},
"source": [
""
],
"execution_count": 0,
"execution_count": null,
"outputs": []
}
]
}
}
61 changes: 52 additions & 9 deletions Desafio_02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/WittmannF/br-data-science/blob/master/python/challenges/Desafio_2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/armandocesar/br-python-challenges/blob/master/Desafio_02.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "q1NCks7Af6JN",
"colab_type": "text"
"id": "q1NCks7Af6JN"
},
"source": [
"### Desafio 2\n",
Expand All @@ -60,16 +59,60 @@
{
"cell_type": "code",
"metadata": {
"id": "sSm6F7sff6JO",
"colab_type": "code",
"colab": {}
"id": "sSm6F7sff6JO"
},
"source": [
"def convert_to_sec(number):\n",
" \n",
" pass\n",
" # Seu código"
],
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "yvo7NBwwWwMJ",
"outputId": "87b6cdc9-e934-4c63-8394-716b6b27dfda",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 68
}
},
"source": [
"def convert_to_sec(number):\n",
" pass # Seu código"
" s=number*3600\n",
" print(s)\n",
" pass\n",
"\n",
"convert_to_sec(5)\n",
"convert_to_sec(3)\n",
"convert_to_sec(2)"
],
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"text": [
"18000\n",
"10800\n",
"7200\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "2FIkrFDGWo25"
},
"source": [
""
],
"execution_count": 0,
"execution_count": null,
"outputs": []
}
]
}
}
43 changes: 30 additions & 13 deletions Desafio_03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/WittmannF/br-data-science/blob/master/python/challenges/Desafio_3.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/armandocesar/br-python-challenges/blob/master/Desafio_03.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "9apVxxygf6JR",
"colab_type": "text"
"id": "9apVxxygf6JR"
},
"source": [
"### Desafio 3\n",
Expand All @@ -53,29 +52,47 @@
"cell_type": "code",
"metadata": {
"id": "ndTkQEUBf6JS",
"colab_type": "code",
"colab": {}
"outputId": "025bfeb3-4a92-494c-c898-8f9056ba9c15",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
}
},
"source": [
"lista = [1,2,3,4,3,30,3,4,5,6,9,3,2,1,2,4,5,15,6,6,3,13,4,45,5]\n",
"\n",
"# Seu código"
"# Seu código\n",
"\n",
"unicos = list(set(lista))\n",
"unicos.sort()\n",
"unicos"
],
"execution_count": 0,
"outputs": []
"execution_count": 69,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[1, 2, 3, 4, 5, 6, 9, 13, 15, 30, 45]"
]
},
"metadata": {
"tags": []
},
"execution_count": 69
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "wo2rA-NriFtO",
"colab_type": "code",
"colab": {}
"id": "wo2rA-NriFtO"
},
"source": [
""
],
"execution_count": 0,
"execution_count": null,
"outputs": []
}
]
}
}
47 changes: 35 additions & 12 deletions Desafio_04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/WittmannF/br-data-science/blob/master/python/challenges/Desafio_4.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/armandocesar/br-python-challenges/blob/master/Desafio_04.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "dOqcKUYZf6JW",
"colab_type": "text"
"id": "dOqcKUYZf6JW"
},
"source": [
"### Desafio 4\n",
Expand All @@ -56,28 +55,52 @@
{
"cell_type": "code",
"metadata": {
"id": "I5TInJDaf6JW",
"colab_type": "code",
"colab": {}
"id": "I5TInJDaf6JW"
},
"source": [
"# Seu código"
"# Seu códig\n",
"def inverte_texto(texto): \n",
" lista = texto.split()\n",
" invertido = lista[::-1]\n",
" print(invertido)"
],
"execution_count": 0,
"execution_count": 28,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "6gq9SLl1xSV1",
"colab_type": "code",
"colab": {}
"outputId": "664b2b58-73d6-4589-aaff-40f961d4ddcb",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
}
},
"source": [
"inverte_texto(\"Python é legal\")"
],
"execution_count": 31,
"outputs": [
{
"output_type": "stream",
"text": [
"['legal', 'é', 'Python']\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "4wEa82cIsEmF"
},
"source": [
""
],
"execution_count": 0,
"execution_count": null,
"outputs": []
}
]
}
}
Loading