things
This commit is contained in:
commit
f09ceabf3f
8 changed files with 136 additions and 0 deletions
1
notebooks/pcc_block_1.ipynb
Normal file
1
notebooks/pcc_block_1.ipynb
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyN8HU6V+ExRbDULNKpqF9hL"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# Hello world\n","\n","This notebook guides you through printing the text \"Hello world\" on the screen. It has been the most frequent first-step in programming learning for decades. Once you have done it, make sure to tell all your programmer friends to blow their minds away."],"metadata":{"id":"y2rlkNsfReAx"}},{"cell_type":"code","execution_count":1,"metadata":{"id":"fsruidThRXTB","executionInfo":{"status":"ok","timestamp":1673901236629,"user_tz":-60,"elapsed":22,"user":{"displayName":"Pablo Martín","userId":"02780439841798207893"}}},"outputs":[],"source":["# This is a comment. Comments are lines starting with #. \n","# Your Python interpreter (the \"thing\" that works when you hit \"Run\") will always ignore comments.\n","# If you run this block, nothing will happen."]},{"cell_type":"code","source":["# In programming, a string is just a series of characters. Think of it as text.\n","# In Python, strings are represented between single ('') or double quotes (\"\")\n","\"I'm a string.\"\n","'Me too!'\n","\n","# To show something to the screen, you need to \"print it\". \n","# To do that, you make a line of code that reads: print(the_thing_you_want_to_print)\n","# Let's print Hello world\n","print(\"Hello world!\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"PeavZeCoRcvX","executionInfo":{"status":"ok","timestamp":1673901430972,"user_tz":-60,"elapsed":330,"user":{"displayName":"Pablo Martín","userId":"02780439841798207893"}},"outputId":"dc171a4e-3f42-4bf1-f68c-43af6589960b"},"execution_count":3,"outputs":[{"output_type":"stream","name":"stdout","text":["Hello world!\n"]}]}]}
|
||||
1
notebooks/pcc_block_2.ipynb
Normal file
1
notebooks/pcc_block_2.ipynb
Normal file
File diff suppressed because one or more lines are too long
1
notebooks/pcc_block_2_my_story.ipynb
Normal file
1
notebooks/pcc_block_2_my_story.ipynb
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyPJzfE9nnXTzvgWeGviPDyj"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":1,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"uP_pKYQytcK9","executionInfo":{"status":"ok","timestamp":1674076113725,"user_tz":-60,"elapsed":29,"user":{"displayName":"Pablo Martín","userId":"02780439841798207893"}},"outputId":"c06e7b90-3a07-4f4f-c9a7-51214f00868c"},"outputs":[{"output_type":"stream","name":"stdout","text":["A long time ago, in the distant land of the Ciutadella Campus, lived a master's student.\n","\n","On the cold nights of February, she enjoyed partying like an animal all day long.\n","\n","But one day, the worse thing ever happened: she had forgotten how to open google colab. It had been 2 days since the\n","last time this had happened.\n","\n","Terrified, the master's student went to visit her Python teacher. After explaining the terrible events to her Python teacher,\n","her Python teacher replied back: 'Oh God, not again Rebeca. It's been 12 times already.'.\n","\n"]}],"source":["story_location = \"the Ciutadella Campus\"\n","pronoun = \"she\"\n","possesive = \"her\"\n","main_character = \"master's student\"\n","enjoyable_activity = \"partying like an animal\"\n","bad_event = \"had forgotten how to open google colab\"\n","time_count = \"2\"\n","time_units = \"days\"\n","savior = \"Python teacher\"\n","saviors_response = \"\"\"'Oh God, not again Rebeca. It's been 12 times already.'\"\"\"\n","\n","story = f\"\"\"A long time ago, in the distant land of {story_location}, lived a {main_character}.\n","\n","On the cold nights of February, {pronoun} enjoyed {enjoyable_activity} all day long.\n","\n","But one day, the worse thing ever happened: {pronoun} {bad_event}. It had been {time_count} {time_units} since the\n","last time this had happened.\n","\n","Terrified, the {main_character} went to visit {possesive} {savior}. After explaining the terrible events to {possesive} {savior},\n","{possesive} {savior} replied back: {saviors_response}.\n","\"\"\"\n","\n","print(story)"]}]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue