diff --git a/module-1/lab-resolving-git-conflicts/your-code/about-me.md b/module-1/lab-resolving-git-conflicts/your-code/about-me.md index 30a999d50..46fe80f40 100644 --- a/module-1/lab-resolving-git-conflicts/your-code/about-me.md +++ b/module-1/lab-resolving-git-conflicts/your-code/about-me.md @@ -1,7 +1,13 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque viverra laoreet lorem et dapibus. Integer auctor dignissim egestas. Ut id purus neque. Pellentesque imperdiet lacus in libero laoreet, at tempus felis tristique. Cras fermentum erat a dui vulputate gravida. Nulla aliquet nisi interdum nulla pretium, ac vestibulum diam congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus lacus risus, sodales vitae viverra quis, maximus ac ipsum. Sed consequat viverra mattis. Curabitur iaculis varius mollis. -Ut porttitor iaculis tellus bibendum euismod. Morbi porta, ante nec tempus porta, felis mi faucibus lacus, sed tristique purus nunc sed est. Aenean pulvinar urna ut lacus interdum aliquam. Pellentesque sit amet magna accumsan, sagittis metus a, volutpat velit. Mauris vitae ex vehicula, posuere nisi sed, sagittis nunc. Ut scelerisque, mi non tristique tristique, mi enim luctus nunc, eu mattis sem quam auctor nunc. Donec lobortis tellus eget blandit ultricies. Vivamus euismod metus eget leo blandit, at malesuada magna efficitur. Praesent sodales faucibus mi, ullamcorper ultrices orci. Vivamus maximus malesuada massa, nec placerat leo feugiat vel. Nam vitae eleifend enim. Nullam interdum ipsum velit, vitae faucibus lectus blandit euismod. +# Who am I -Suspendisse ut malesuada ex. Nulla ultricies nisl et nisi rhoncus sollicitudin. Vestibulum maximus iaculis ligula, nec commodo nunc ullamcorper nec. Duis quis condimentum sapien. Cras vestibulum interdum felis eu auctor. Quisque semper, magna at dapibus faucibus, felis risus semper ligula, id aliquam lectus ligula vel nisi. In hac habitasse platea dictumst. Donec arcu sapien, suscipit ac dictum et, imperdiet id tortor. Maecenas ornare sodales interdum. Mauris dictum felis eu eros vestibulum cursus. Phasellus accumsan, turpis ut malesuada sollicitudin, augue leo venenatis ante, vel convallis tellus diam sit amet lacus. Aenean eu mauris eros. Praesent ante lacus, gravida sit amet tellus nec, laoreet ultrices lacus. Integer commodo semper vestibulum. Fusce felis massa, consectetur facilisis rutrum nec, pulvinar et nisi. +* Where are you from? São Bernardo do Campo/SP - Brasil +* What do you do? Estudante do curso de Data Analytics +* Do you have previous experience with technology/data? Não tenho experiência +* What has brought you to Ironhack? A possibilidade de mudar de área +* What knowledge/skills do you expect to learn in this bootcamp? Programação, Análise de Dados e Banco de Dados -Morbi fermentum ultricies tortor, vehicula ultrices eros elementum a. Duis ornare aliquam facilisis. Proin aliquam tincidunt odio vitae dignissim. Sed malesuada lacinia massa, nec blandit urna auctor elementum. Duis auctor non tortor in consequat. Mauris id vestibulum risus. In eget erat sed lacus efficitur viverra sed eu est. Aliquam interdum consequat molestie. Aliquam metus nisi, blandit non semper ut, blandit vel leo. Cras dictum turpis erat, sed iaculis ligula facilisis dapibus. Aliquam posuere dignissim fermentum. Praesent at neque sit amet lectus ornare iaculis. Curabitur id urna quis lorem varius ultrices eu sit amet sapien. Curabitur maximus volutpat suscipit. Proin imperdiet elementum lacus a eleifend. Sed tempor lacus posuere diam vehicula iaculis. +# What will I do after the bootcamp? + +* Which industry will you seek employment in? Não sei ainda. +* What will your future role look like? Que eu tenha conseguido atingir meus objetivos (que foram definidos hoje) e que já tenha novos objetivos definidos e em andamen* What is your career goal? Realização profissional diff --git a/module-1/python-project/your-code/Untitled.ipynb b/module-1/python-project/your-code/Untitled.ipynb new file mode 100644 index 000000000..51b6ba945 --- /dev/null +++ b/module-1/python-project/your-code/Untitled.ipynb @@ -0,0 +1,46 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1.0000000000000007\n" + ] + } + ], + "source": [ + "i= 0.01\n", + "j = 0\n", + "for a in range(0, 100):\n", + " j = j + i\n", + "print(j)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/module-1/python-project/your-code/main.ipynb b/module-1/python-project/your-code/main.ipynb new file mode 100644 index 000000000..86c5c1150 --- /dev/null +++ b/module-1/python-project/your-code/main.ipynb @@ -0,0 +1,329 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "# define rooms and items\n", + "\n", + "couch = {\n", + " \"name\": \"couch\",\n", + " \"type\": \"furniture\",\n", + "}\n", + "\n", + "door_a = {\n", + " \"name\": \"door a\",\n", + " \"type\": \"door\",\n", + "}\n", + "\n", + "key_a = {\n", + " \"name\": \"key for door a\",\n", + " \"type\": \"key\",\n", + " \"target\": door_a,\n", + "}\n", + "\n", + "piano = {\n", + " \"name\": \"piano\",\n", + " \"type\": \"furniture\",\n", + "}\n", + "\n", + "game_room = {\n", + " \"name\": \"game room\",\n", + " \"type\": \"room\",\n", + "}\n", + "\n", + "door_b = {\n", + " \"name\": \"door b\",\n", + " \"type\": \"door\",\n", + "}\n", + "\n", + "door_c = {\n", + " \"name\": \"door c\",\n", + " \"type\": \"door\",\n", + "}\n", + "\n", + "queen_bed = {\n", + " \"name\": \"queen bed\",\n", + " \"type\": \"furniture\",\n", + "}\n", + "\n", + "key_b = {\n", + " \"name\": \"key for door b\",\n", + " \"type\": \"key\",\n", + " \"target\": door_b,\n", + "}\n", + "\n", + "bedroom_1 = {\n", + " \"name\": \"bedroom 1\",\n", + " \"type\": \"room\",\n", + "}\n", + "\n", + "double_bed = {\n", + " \"name\": \"double bed\",\n", + " \"type\": \"furniture\",\n", + " \n", + "}\n", + "\n", + "dresser ={\n", + " \"name\": \"dresser\",\n", + " \"type\": \"furniture\",\n", + "}\n", + "\n", + "key_c = {\n", + " \"name\": \"key for door c\",\n", + " \"type\": \"key\",\n", + " \"target\": door_c,\n", + "}\n", + "\n", + "\"\"\"\"key_d = {\n", + " \"name\": \"key for door d\",\n", + " \"type\": \"key\",\n", + " \"target\": door_d,\n", + "}\"\"\"\n", + "\n", + "bedroom_2 = {\n", + " \"name\": \"bedroom 2\",\n", + " \"type\": \"room\",\n", + "}\n", + "\n", + "dining_table = {\n", + " \"name\": \"dining table\",\n", + " \"type\": \"furniture\",\n", + "}\n", + "\n", + "door_d = {\n", + " \"name\": \"door d\",\n", + " \"type\": \"door\",\n", + "}\n", + "\n", + "living_room = {\n", + " \"name\": \"living room\",\n", + " \"type\": \"room\",\n", + "}\n", + "\n", + "outside = {\n", + " \"name\": \"outside\"\n", + "}\n", + "\n", + "\n", + "\n", + "all_rooms = [game_room, bedroom_1, outside]\n", + "\n", + "all_doors = [door_a, door_b]\n", + "\n", + "# define which items/rooms are related\n", + "\n", + "object_relations = {\n", + " \"game room\": [couch, piano, door_a],\n", + " \"piano\": [key_a],\n", + " \"outside\": [door_b],\n", + " \"door a\": [game_room, bedroom_1],\n", + " \"bedroom_1\": [door_a, door_b, queen_bed],\n", + " \"queen_bed\": [key_b],\n", + " \"door_b\": [bedroom_1, outside],\n", + "}\n", + "\n", + "# define game state. Do not directly change this dict. \n", + "# Instead, when a new game starts, make a copy of this\n", + "# dict and use the copy to store gameplay state. This \n", + "# way you can replay the game multiple times.\n", + "\n", + "INIT_GAME_STATE = {\n", + " \"current_room\": game_room,\n", + " \"keys_collected\": [],\n", + " \"target_room\": bedroom_1,\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "def linebreak():\n", + " \"\"\"\n", + " Print a line break\n", + " \"\"\"\n", + " print(\"\\n\\n\")\n", + "\n", + "def start_game():\n", + " \"\"\"\n", + " Start the game\n", + " \"\"\"\n", + " print(\"You wake up on a couch and find yourself in a strange house with no windows which you have never been to before. You don't remember why you are here and what had happened before. You feel some unknown danger is approaching and you must get out of the house, NOW!\")\n", + " play_room(game_state[\"current_room\"])\n", + "\n", + "def play_room(room):\n", + " \"\"\"\n", + " Play a room. First check if the room being played is the target room.\n", + " If it is, the game will end with success. Otherwise, let player either \n", + " explore (list all items in this room) or examine an item found here.\n", + " \"\"\"\n", + " game_state[\"current_room\"] = room\n", + " if(game_state[\"current_room\"] == game_state[\"target_room\"]):\n", + " print(\"Congrats! You escaped the room!\")\n", + " else:\n", + " print(\"You are now in \" + room[\"name\"])\n", + " intended_action = input(\"What would you like to do? Type 'explore' or 'examine'?\").strip()\n", + " if intended_action == \"explore\":\n", + " explore_room(room)\n", + " play_room(room)\n", + " elif intended_action == \"examine\":\n", + " examine_item(input(\"What would you like to examine?\").strip())\n", + " else:\n", + " print(\"Not sure what you mean. Type 'explore' or 'examine'.\")\n", + " play_room(room)\n", + " linebreak()\n", + "\n", + "def explore_room(room):\n", + " \"\"\"\n", + " Explore a room. List all items belonging to this room.\n", + " \"\"\"\n", + " items = [i[\"name\"] for i in object_relations[room[\"name\"]]]\n", + " print(\"You explore the room. This is \" + room[\"name\"] + \". You find \" + \", \".join(items))\n", + "\n", + "def get_next_room_of_door(door, current_room):\n", + " \"\"\"\n", + " From object_relations, find the two rooms connected to the given door.\n", + " Return the room that is not the current_room.\n", + " \"\"\"\n", + " connected_rooms = object_relations[door[\"name\"]]\n", + " for room in connected_rooms:\n", + " if(not current_room == room):\n", + " return room\n", + "\n", + "def examine_item(item_name):\n", + " \"\"\"\n", + " Examine an item which can be a door or furniture.\n", + " First make sure the intended item belongs to the current room.\n", + " Then check if the item is a door. Tell player if key hasn't been \n", + " collected yet. Otherwise ask player if they want to go to the next\n", + " room. If the item is not a door, then check if it contains keys.\n", + " Collect the key if found and update the game state. At the end,\n", + " play either the current or the next room depending on the game state\n", + " to keep playing.\n", + " \"\"\"\n", + " current_room = game_state[\"current_room\"]\n", + " next_room = \"\"\n", + " output = None\n", + " \n", + " for item in object_relations[current_room[\"name\"]]:\n", + " if(item[\"name\"] == item_name):\n", + " output = \"You examine \" + item_name + \". \"\n", + " if(item[\"type\"] == \"door\"):\n", + " have_key = False\n", + " for key in game_state[\"keys_collected\"]:\n", + " if(key[\"target\"] == item):\n", + " have_key = True\n", + " if(have_key):\n", + " output += \"You unlock it with a key you have.\"\n", + " next_room = get_next_room_of_door(item, current_room)\n", + " else:\n", + " output += \"It is locked but you don't have the key.\"\n", + " else:\n", + " if(item[\"name\"] in object_relations and len(object_relations[item[\"name\"]])>0):\n", + " item_found = object_relations[item[\"name\"]].pop()\n", + " game_state[\"keys_collected\"].append(item_found)\n", + " output += \"You find \" + item_found[\"name\"] + \".\"\n", + " else:\n", + " output += \"There isn't anything interesting about it.\"\n", + " print(output)\n", + " break\n", + "\n", + " if(output is None):\n", + " print(\"The item you requested is not found in the current room.\")\n", + " \n", + " if(next_room and input(\"Do you want to go to the next room? Ener 'yes' or 'no'\").strip() == 'yes'):\n", + " play_room(next_room)\n", + " else:\n", + " play_room(current_room)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "You wake up on a couch and find yourself in a strange house with no windows which you have never been to before. You don't remember why you are here and what had happened before. You feel some unknown danger is approaching and you must get out of the house, NOW!\n", + "You are now in game room\n", + "What would you like to do? Type 'explore' or 'examine'?explore\n", + "You explore the room. This is game room. You find couch, piano, door a\n", + "You are now in game room\n", + "What would you like to do? Type 'explore' or 'examine'?examine\n", + "What would you like to examine?piano\n", + "You examine piano. You find key for door a.\n", + "You are now in game room\n", + "What would you like to do? Type 'explore' or 'examine'?examine\n", + "What would you like to examine?door a\n", + "You examine door a. You unlock it with a key you have.\n", + "Do you want to go to the next room? Ener 'yes' or 'no'yes\n", + "Congrats! You escaped the room!\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ], + "source": [ + "game_state = INIT_GAME_STATE.copy()\n", + "\n", + "start_game()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/module-1/python-project/your-code/sample-code.ipynb b/module-1/python-project/your-code/sample-code.ipynb index a6f8a94d5..366011c95 100644 --- a/module-1/python-project/your-code/sample-code.ipynb +++ b/module-1/python-project/your-code/sample-code.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -170,7 +170,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -179,34 +179,7 @@ "text": [ "You wake up on a couch and find yourself in a strange house with no windows which you have never been to before. You don't remember why you are here and what had happened before. You feel some unknown danger is approaching and you must get out of the house, NOW!\n", "You are now in game room\n", - "What would you like to do? Type 'explore' or 'examine'?explore\n", - "You explore the room. This is game room. You find couch, piano, door a\n", - "You are now in game room\n", - "What would you like to do? Type 'explore' or 'examine'?examine\n", - "What would you like to examine?door a\n", - "You examine door a. It is locked but you don't have the key.\n", - "You are now in game room\n", - "What would you like to do? Type 'explore' or 'examine'?examine\n", - "What would you like to examine?piano\n", - "You examine piano. You find key for door a.\n", - "You are now in game room\n", - "What would you like to do? Type 'explore' or 'examine'?examine\n", - "What would you like to examine?door a\n", - "You examine door a. You unlock it with a key you have.\n", - "Do you want to go to the next room? Ener 'yes' or 'no'yes\n", - "Congrats! You escaped the room!\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n" + "What would you like to do? Type 'explore' or 'examine'?examine\n" ] } ], @@ -216,6 +189,20 @@ "start_game()" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, @@ -240,7 +227,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.7.3" } }, "nbformat": 4, diff --git a/module-1/python-project/your-code/teste.ipynb b/module-1/python-project/your-code/teste.ipynb new file mode 100644 index 000000000..41d884dc7 --- /dev/null +++ b/module-1/python-project/your-code/teste.ipynb @@ -0,0 +1,80 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "You wake up on a couch and find yourself in a strange house with no windows which you have never been to before. You don't remember why you are here and what had happened before. You feel some unknown danger is approaching and you must get out of the house, NOW! You are now in game room.\n" + ] + } + ], + "source": [ + "print(\"You wake up on a couch and find yourself in a strange house with no windows which you have never been to before. You don't remember why you are here and what had happened before. You feel some unknown danger is approaching and you must get out of the house, NOW! You are now in game room.\")\n", + "player_choice = input(\"What would you like to do? Type 'explore' or 'examine'?\")\n", + "key_a = \"false\"\n", + "game_room : ['couch', 'piano', \"door a\"]\n", + "\n", + "if player_choice == \"explore\":\n", + " print(\"This is Game Room. You find couch, piano, and Door A.\")\n", + " choice_gameroom = input(\"Type: couch, piano or door a\")\n", + "\n", + "else:\n", + " print(\"What would you like to examine?\")\n", + " choice_gameroom = input(\"Type: couch, piano or door a\")\n", + " \n", + " if choice_gameroom == \"couch\":\n", + " print(\"There isn't anything interesting about it.\")\n", + " choice_gameroom = input(\"Type: couch, piano or door a\")\n", + " \n", + " elif choice_gameroom == \"piano\":\n", + " print(\"You found the key for door a!\")\n", + " key_a = true\n", + " \n", + " elif choice_gameroom == \"door a\" and key_a == \"true\":\n", + " print(\"You unlock it with a key you have!\")\n", + " next_level = input(\"Do you want to go to the next room? Type yer or no\")\n", + " \n", + " elif choice_gameroom == \"door a\" and key_a == \"false\": \n", + " print(\"It is locked but you don't have the key.\")\n", + " choice_gameroom = input(\"Type: couch, piano or door a\") \n", + " \n", + " else:\n", + " choice_gameroom = input(\"Type: couch, piano or door a\")\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}