{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyMNBgIj7UN8f/52SCQa771v"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"WSDuY7RskLt9"},"outputs":[],"source":["#Example 1: Write a program which takes number input from the user and prints whether number is even or odd."]},{"cell_type":"code","source":["# Program to check if a number is even or odd\n","num = int(input(\"Enter a number: \"))\n","\n","# Check if the number is even\n","if num % 2 == 0:\n","    print(num, \"is even.\")\n","else:\n","    print(num, \"is odd.\")"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"46tpGZbnkQSf","executionInfo":{"status":"ok","timestamp":1717677701442,"user_tz":-330,"elapsed":19158,"user":{"displayName":"Amit Sachan","userId":"17076119069500437280"}},"outputId":"3810a6cd-19de-4bc1-aafb-79731f32920b"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Enter a number: 56\n","56 is even.\n"]}]},{"cell_type":"code","source":[],"metadata":{"id":"sGDcHoFckQWO"},"execution_count":null,"outputs":[]}]}