Skip to content

Commit

Permalink
notebook 4
Browse files Browse the repository at this point in the history
  • Loading branch information
iamanolive committed Jun 2, 2024
1 parent 28654c2 commit 6905981
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions kaggle-courses/python-programming/notebook4.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyMKGW0L6C22sBHSSX7lR2a9",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/iamanolive/code-harbor-hub/blob/main/kaggle-courses/python-programming/notebook4.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "fRij3iqHqGHv"
},
"outputs": [],
"source": [
"def select_second(L):\n",
" if len(L) >= 2: return L[1]\n",
" else: return None"
]
},
{
"cell_type": "code",
"source": [
"def losing_team_captain(teams):\n",
" return teams[-1][1]"
],
"metadata": {
"id": "mUigMl6Fqd_X"
},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def purple_shell(racers):\n",
" racers[0], racers[-1] = racers[-1], racers[0]"
],
"metadata": {
"id": "sRnDxgLqqvxy"
},
"execution_count": 3,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def fashionably_late(arrivals, name):\n",
" return (name != arrivals[-1]) and (arrivals.index(name) >= len(arrivals) / 2)"
],
"metadata": {
"id": "QPwAmuirrY9I"
},
"execution_count": 4,
"outputs": []
}
]
}

0 comments on commit 6905981

Please sign in to comment.