{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"generative_ai_disabled":true,"authorship_tag":"ABX9TyNP8cTX6BL0oz4zV1pDtH57"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"bNG8nyu7rPQW"},"outputs":[],"source":["\n","# Add comments to the code to explain:\n","  # What will be output when the code is run?\n","  # In what circumstances would the other output message be produced\n","# Then run the code to see if you're right.\n","\n","num1 = 42\n","\n","if num1 == 42:\n","  print(\"You have discovered the meaning of life!\")\n","else:\n","  print(\"Sorry, you have failed to discover the meaning of life!\")\n"]},{"cell_type":"code","source":["# Add to the code below so that it outputs 'You're not Dave!' if the user does not input 'Dave'\n","\n","name = input(\"What's your name?\")\n","\n","if name == \"Dave\":\n","  print(\"Hello Dave\")\n","\n","# What is the condition in the code?\n","\n","# How would the code work if the operator was !> ?\n","\n","# EXTRA CHALLENGE - Adapt the code so that it works in the same way but uses a not equal to Boolean operator."],"metadata":{"id":"r_CbH9I9rk4I"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Task 3 - Make - The login checker\n","\n","# Write a program that:\n","  # Stores the number 1337 in a variable called 'password'\n","  # Asks the user to guess the password and stores their input in a new variable (you choose the name)\n","  # If the user inputs 1337 then output 'Password correct', otherwise output 'Password incorrect'\n"],"metadata":{"id":"a0w6npJ8ruJh"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["  # Task 4 - Make 2 - Extra Challenge\n","\n","  # Write a program that:\n","    # Asks the user to input two different numbers and stores them in two variables.\n","    # Outputs the biggest number entered\n","\n",""],"metadata":{"id":"QV16InTVr4-L"},"execution_count":null,"outputs":[]}]}