{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"generative_ai_disabled":true,"authorship_tag":"ABX9TyNN9hbxzXZJQ+GU7c14e7S6"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"BE2krNJf-OjP"},"outputs":[],"source":["# Input With Variables\n","\n","#Task 1 - Add comments to the code below to predict what will happen when it is run.\n","\n","#Task 2 - add comments to the code to explain what the variables are called and where they are used. Make sure to show where the variable is assigned a value.\n","\n","print(\"Hi! What's your name?\")\n","\n","name = \"Dave\"\n","\n","print(\"Hi \" + name + \"! How are you today?\")\n","\n"]},{"cell_type":"code","source":["# Task 3 - Adapt the code so that it assigns input into the 'name' variable. CHALLENGE - put a prompt in the input command to ask the user for their name.\n"],"metadata":{"id":"-UsKlgIO-kIW"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Task 4 - Combine lines 'Do you like programming' and answer = input  so that  the input has a prompt in it.\n"],"metadata":{"id":"qpLJIkQU-oKV"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["#Task 5 - Adapt the output on the next-to-last line so that it includes both the name and the answer variables.\n","\n","name = \"Billy\"\n","print(\"We want to know if you like progamming!\")\n","print()\n","print(\"Do you like programming \" + name + \"?\")\n","answer = input()\n","print(\"Great! You said \" + answer + \"!\")\n","print(\"Let's learn some Python today\")\n","\n"],"metadata":{"id":"WfX0o4zR-zfZ"},"execution_count":null,"outputs":[]}]}