{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "code", "source": [ "# Application 1 - Treasure Hunt\n", "\n", "print(\"๐Ÿก Welcome to the 'Hunt Around the Home' Treasure Game!\")\n", "print(\"๐Ÿงฉ Solve 7 riddles to find where to go next.\")\n", "print(\"Each clue leads you to a real place or object around your house.\\n\")\n", "\n", "score = 0\n", "\n", "print(\"๐Ÿงบ Clue 1:\\nI help clean clothes, I spin and whirr,\\nCheck where the clothes take a bubbly stir.\")\n", "answer1 = input(\"Your answer: \").lower() # We'll explore this built in function soon!\n", "\n", "if answer1 == \"washing machine\":\n", " print(\"โœ… Correct! Go to the washing machine to find your next clue.\\n\")\n", " score += 1\n", "\n", " print(\"๐ŸŒฟ Clue 2:\\nI'm full of flowers, green and neat,\\nStep outside and feel the breeze so sweet.\")\n", " answer2 = input(\"Your answer: \").lower()\n", "\n", " if answer2 == \"garden\":\n", " print(\"โœ… Fresh! Head over to the garden for your next clue.\\n\")\n", " score += 1\n", "\n", " print(\"โ˜• Clue 3:\\nHere I sit and boil your tea,\\nIn the kitchen is where I'll be.\")\n", " answer3 = input(\"Your answer: \").lower()\n", "\n", " if answer3 == \"kettle\":\n", " print(\"โœ… Perfect! The kettle whispers your next clue.\\n\")\n", " score += 1\n", "\n", " print(\"๐Ÿชž Clue 4:\\nI show your face both day and night,\\nIn bathrooms or bedrooms, I reflect light.\")\n", " answer4 = input(\"Your answer: \").lower()\n", "\n", " if answer4 == \"mirror\":\n", " print(\"โœ… Looking sharp! Check the mirror for your next clue.\\n\")\n", " score += 1\n", "\n", " print(\"๐Ÿ›‹๏ธ Clue 5:\\nIโ€™m soft and comfy, where you take a nap,\\nSit with a book or take a quick nap.\")\n", " answer5 = input(\"Your answer: \").lower()\n", "\n", " if answer5 == \"sofa\" or answer5 == \"couch\":\n", " print(\"โœ… Cozy! Head to the sofa for your next riddle.\\n\")\n", " score += 1\n", "\n", " print(\"๐Ÿ›๏ธ Clue 6:\\nI hold your dreams and fluffy pillow,\\nCome here to rest when the moon is yellow.\")\n", " answer6 = input(\"Your answer: \").lower()\n", "\n", " if answer6 == \"bed\":\n", " print(\"โœ… Dreamy! Look near your bed for the final clue.\\n\")\n", " score += 1\n", "\n", " print(\"๐ŸŽ Final Clue:\\nI keep your treasures locked away,\\nFind your gift where your jewels stay.\")\n", " answer7 = input(\"Your answer: \").lower()\n", "\n", " if answer7 == \"drawer\" or answer7 == \"jewelry box\":\n", " print(\"๐ŸŽ‰ Congratulations! You found the final treasure!\")\n", " print(\"๐Ÿ† Your reward: a smile, a snack, and a proud happy dance!\\n\")\n", " score += 1\n", " else:\n", " print(\"โŒ Oops! Hint: It's where valuables are stored.\")\n", " print(\"โœ”๏ธ Answer: Jewelry box or drawer\\n\")\n", " else:\n", " print(\"โŒ Wrong. Hint: You sleep on me every night.\")\n", " print(\"โœ”๏ธ Answer: Bed\\n\")\n", " else:\n", " print(\"โŒ Incorrect. Hint: Soft seating in the hall.\")\n", " print(\"โœ”๏ธ Answer: Sofa\\n\")\n", " else:\n", " print(\"โŒ Wrong. Hint: I reflect you.\")\n", " print(\"โœ”๏ธ Answer: Mirror\\n\")\n", " else:\n", " print(\"โŒ Nope. Hint: I heat water for tea.\")\n", " print(\"โœ”๏ธ Answer: Kettle\\n\")\n", " else:\n", " print(\"โŒ Incorrect. Hint: Itโ€™s outside with plants.\")\n", " print(\"โœ”๏ธ Answer: Garden\\n\")\n", "else:\n", " print(\"โŒ Wrong. Hint: It washes your clothes, not your hands.\")\n", " print(\"โœ”๏ธ Answer: Washing Machine\\n\")\n", "\n", "print(f\"โญ Final Score: {score}/7 โญ\")\n", "\n", "if score == 7:\n", " print(\"๐ŸŽŠ You're the Home Hunt Champion! Enjoy your treasure!\")\n", "elif score >= 4:\n", " print(\"๐Ÿ‘ Well done! Youโ€™re almost there, try again later!\")\n", "else:\n", " print(\"๐Ÿ” Keep exploring, treasure awaits you next time!\")\n", "\n", "print(\"๐Ÿ”š Thanks for playing the Hunt Around the Home!\")\n" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "oAgKHn76K-ou", "outputId": "821a145f-b9f4-4477-aadc-7fa2da6e5a30" }, "execution_count": 1, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐Ÿก Welcome to the 'Hunt Around the Home' Treasure Game!\n", "๐Ÿงฉ Solve 7 riddles to find where to go next.\n", "Each clue leads you to a real place or object around your house.\n", "\n", "๐Ÿงบ Clue 1:\n", "I help clean clothes, I spin and whirr,\n", "Check where the clothes take a bubbly stir.\n", "Your answer: washing machine\n", "โœ… Correct! Go to the washing machine to find your next clue.\n", "\n", "๐ŸŒฟ Clue 2:\n", "I'm full of flowers, green and neat,\n", "Step outside and feel the breeze so sweet.\n", "Your answer: garden\n", "โœ… Fresh! Head over to the garden for your next clue.\n", "\n", "โ˜• Clue 3:\n", "Here I sit and boil your tea,\n", "In the kitchen is where I'll be.\n", "Your answer: kettle\n", "โœ… Perfect! The kettle whispers your next clue.\n", "\n", "๐Ÿชž Clue 4:\n", "I show your face both day and night,\n", "In bathrooms or bedrooms, I reflect light.\n", "Your answer: mirror\n", "โœ… Looking sharp! Check the mirror for your next clue.\n", "\n", "๐Ÿ›‹๏ธ Clue 5:\n", "Iโ€™m soft and comfy, where you take a nap,\n", "Sit with a book or take a quick nap.\n", "Your answer: sofa\n", "โœ… Cozy! Head to the sofa for your next riddle.\n", "\n", "๐Ÿ›๏ธ Clue 6:\n", "I hold your dreams and fluffy pillow,\n", "Come here to rest when the moon is yellow.\n", "Your answer: bed\n", "โœ… Dreamy! Look near your bed for the final clue.\n", "\n", "๐ŸŽ Final Clue:\n", "I keep your treasures locked away,\n", "Find your gift where your jewels stay.\n", "Your answer: jewelry box\n", "๐ŸŽ‰ Congratulations! You found the final treasure!\n", "๐Ÿ† Your reward: a smile, a snack, and a proud happy dance!\n", "\n", "โญ Final Score: 7/7 โญ\n", "๐ŸŽŠ You're the Home Hunt Champion! Enjoy your treasure!\n", "๐Ÿ”š Thanks for playing the Hunt Around the Home!\n" ] } ] }, { "cell_type": "code", "source": [ "# Application 2 - Ticket Booking App\n", "\n", "print(\"๐ŸŽซ Welcome to QuickBook - Your Travel Assistant\\n\")\n", "print(\"What would you like to book today?\")\n", "print(\"1. Bus\")\n", "print(\"2. Train\")\n", "print(\"3. Flight\")\n", "print(\"4. Rental Car\")\n", "\n", "choice = input(\"Enter your choice (bus/train/flight/car): \").lower()\n", "\n", "if choice == \"bus\":\n", " print(\"\\n๐ŸšŒ Bus Booking Selected\")\n", " from_location = input(\"From: \")\n", " to_location = input(\"To: \")\n", " date = input(\"Date of travel (DD-MM-YYYY): \")\n", " seats = input(\"Number of seats: \")\n", " ac_choice = input(\"Do you prefer AC or Non-AC? \")\n", "\n", " print(f\"\\nโœ… Booking confirmed for {seats} seat(s) in a {ac_choice.upper()} bus from {from_location} to {to_location} on {date}.\")\n", "\n", "elif choice == \"train\":\n", " print(\"\\n๐Ÿš† Train Booking Selected\")\n", " from_station = input(\"From Station: \")\n", " to_station = input(\"To Station: \")\n", " date = input(\"Date of journey (DD-MM-YYYY): \")\n", " seat_class = input(\"Class (Sleeper/3AC/2AC/1AC): \")\n", " passengers = input(\"Number of passengers: \")\n", "\n", " print(f\"\\nโœ… Booking confirmed for {passengers} passenger(s) in {seat_class.upper()} class from {from_station} to {to_station} on {date}.\")\n", "\n", "elif choice == \"flight\":\n", " print(\"\\nโœˆ๏ธ Flight Booking Selected\")\n", " from_airport = input(\"From Airport: \")\n", " to_airport = input(\"To Airport: \")\n", " date = input(\"Date of departure (DD-MM-YYYY): \")\n", " seat_type = input(\"Seat Type (Economy/Business/First): \")\n", " airline = input(\"Preferred airline (Optional, press enter to skip): \")\n", "\n", " if airline:\n", " print(f\"\\nโœ… Booking confirmed on {airline.title()} from {from_airport} to {to_airport} on {date} in {seat_type.upper()} class.\")\n", " else:\n", " print(f\"\\nโœ… Booking confirmed from {from_airport} to {to_airport} on {date} in {seat_type.upper()} class.\")\n", "\n", "elif choice == \"car\":\n", " print(\"\\n๐Ÿš— Rental Car Booking Selected\")\n", " pickup_location = input(\"Pickup Location: \")\n", " drop_location = input(\"Drop Location: \")\n", " pickup_date = input(\"Pickup Date (DD-MM-YYYY): \")\n", " rental_days = input(\"Number of rental days: \")\n", " car_type = input(\"Type of car (Hatchback/Sedan/SUV): \")\n", "\n", " print(f\"\\nโœ… Booking confirmed for a {car_type.upper()} car from {pickup_location} to {drop_location},\")\n", " print(f\" starting on {pickup_date} for {rental_days} day(s).\")\n", "\n", "else:\n", " print(\"โŒ Invalid choice. Please restart and choose from bus, train, flight, or car.\")\n", "\n", "print(\"\\n๐Ÿ”š Thank you for using QuickBook!\")\n" ], "metadata": { "id": "sPeI-OUwK-rV", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "d0dd734c-38ec-4b57-b2cd-b6655d9287cc" }, "execution_count": 2, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐ŸŽซ Welcome to QuickBook - Your Travel Assistant\n", "\n", "What would you like to book today?\n", "1. Bus\n", "2. Train\n", "3. Flight\n", "4. Rental Car\n", "Enter your choice (bus/train/flight/car): bus\n", "\n", "๐ŸšŒ Bus Booking Selected\n", "From: Coimbatore\n", "To: Ayodhya\n", "Date of travel (DD-MM-YYYY): 20-04-2025\n", "Number of seats: 2\n", "Do you prefer AC or Non-AC? AC\n", "\n", "โœ… Booking confirmed for 2 seat(s) in a AC bus from Coimbatore to Ayodhya on 20-04-2025.\n", "\n", "๐Ÿ”š Thank you for using QuickBook!\n" ] } ] }, { "cell_type": "code", "source": [ "# Application 3 - Grocery Booking App\n", "\n", "print(\"๐Ÿ›’ Welcome to EasyGrocery Booking!\\n\")\n", "print(\"Available Items:\")\n", "print(\"1. Rice - โ‚น50 per kg\")\n", "print(\"2. Milk - โ‚น25 per packet\")\n", "print(\"3. Apple - โ‚น15 each\")\n", "print(\"4. Banana - โ‚น5 each\")\n", "print(\"5. Tomato - โ‚น20 per kg\")\n", "print(\"6. Potato - โ‚น25 per kg\")\n", "print(\"7. Onion - โ‚น30 per kg\")\n", "\n", "item = input(\"\\nEnter the item you want to buy: \").lower()\n", "\n", "if item == \"rice\":\n", " price = 50\n", " quantity = int(input(\"How many kg of rice? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} kg of Rice. Amount = โ‚น{total}\")\n", "\n", "elif item == \"milk\":\n", " price = 25\n", " quantity = int(input(\"How many packets of milk? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} packet(s) of Milk. Amount = โ‚น{total}\")\n", "\n", "elif item == \"apple\":\n", " price = 15\n", " quantity = int(input(\"How many apples? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} Apple(s). Amount = โ‚น{total}\")\n", "\n", "elif item == \"banana\":\n", " price = 5\n", " quantity = int(input(\"How many bananas? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} Banana(s). Amount = โ‚น{total}\")\n", "\n", "elif item == \"tomato\":\n", " price = 20\n", " quantity = int(input(\"How many kg of tomatoes? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} kg of Tomato. Amount = โ‚น{total}\")\n", "\n", "elif item == \"potato\":\n", " price = 25\n", " quantity = int(input(\"How many kg of potatoes? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} kg of Potato. Amount = โ‚น{total}\")\n", "\n", "elif item == \"onion\":\n", " price = 30\n", " quantity = int(input(\"How many kg of onions? \"))\n", " total = price * quantity\n", " print(f\"You selected {quantity} kg of Onion. Amount = โ‚น{total}\")\n", "\n", "else:\n", " print(\"โŒ Item not found. Please select from the listed items.\")\n", " total = 0\n", "\n", "if total > 0:\n", " print(\"\\n๐Ÿšš Choose Delivery Option:\")\n", " print(\"1. Home Delivery (โ‚น30 extra)\")\n", " print(\"2. Store Pickup (Free)\")\n", " delivery = input(\"Enter 1 or 2: \")\n", "\n", " if delivery == \"1\":\n", " delivery_charge = 30\n", " print(\"๐Ÿ  Home delivery selected. โ‚น30 added.\")\n", " else:\n", " delivery_charge = 0\n", " print(\"๐Ÿฌ Store pickup selected. No extra charge.\")\n", "\n", " grand_total = total + delivery_charge\n", "\n", " print(\"\\n๐Ÿ’ณ Choose Payment Method:\")\n", " print(\"1. Cash on Delivery\")\n", " print(\"2. UPI\")\n", " print(\"3. Card Payment\")\n", " payment = input(\"Enter 1, 2 or 3: \")\n", "\n", " if payment == \"1\":\n", " payment_mode = \"Cash on Delivery\"\n", " elif payment == \"2\":\n", " payment_mode = \"UPI\"\n", " else:\n", " payment_mode = \"Card Payment\"\n", "\n", " print(\"\\n๐Ÿงพ Final Bill\")\n", " print(f\"Item: {item.title()} x {quantity}\")\n", " print(f\"Total: โ‚น{total}\")\n", " print(f\"Delivery Charge: โ‚น{delivery_charge}\")\n", " print(f\"Grand Total: โ‚น{grand_total}\")\n", " print(f\"Payment Mode: {payment_mode}\")\n", " print(\"\\nโœ… Thank you for shopping with EasyGrocery!\")\n" ], "metadata": { "id": "D3GM-fndK-t9", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "de347478-ef7f-4dcc-972b-3354bffc6ef5" }, "execution_count": 3, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐Ÿ›’ Welcome to EasyGrocery Booking!\n", "\n", "Available Items:\n", "1. Rice - โ‚น50 per kg\n", "2. Milk - โ‚น25 per packet\n", "3. Apple - โ‚น15 each\n", "4. Banana - โ‚น5 each\n", "5. Tomato - โ‚น20 per kg\n", "6. Potato - โ‚น25 per kg\n", "7. Onion - โ‚น30 per kg\n", "\n", "Enter the item you want to buy: potato\n", "How many kg of potatoes? 2\n", "You selected 2 kg of Potato. Amount = โ‚น50\n", "\n", "๐Ÿšš Choose Delivery Option:\n", "1. Home Delivery (โ‚น30 extra)\n", "2. Store Pickup (Free)\n", "Enter 1 or 2: 1\n", "๐Ÿ  Home delivery selected. โ‚น30 added.\n", "\n", "๐Ÿ’ณ Choose Payment Method:\n", "1. Cash on Delivery\n", "2. UPI\n", "3. Card Payment\n", "Enter 1, 2 or 3: 1\n", "\n", "๐Ÿงพ Final Bill\n", "Item: Potato x 2\n", "Total: โ‚น50\n", "Delivery Charge: โ‚น30\n", "Grand Total: โ‚น80\n", "Payment Mode: Cash on Delivery\n", "\n", "โœ… Thank you for shopping with EasyGrocery!\n" ] } ] }, { "cell_type": "code", "source": [ "# Application 4 - Pythagoras Theorem Calculator\n", "\n", "print(\"๐Ÿ“ Welcome to the Pythagoras Theorem Calculator!\")\n", "print(\"You can calculate:\")\n", "print(\"1. Hypotenuse\")\n", "print(\"2. One of the sides (height or base)\")\n", "\n", "choice = input(\"Enter 1 to find hypotenuse, 2 to find a side: \")\n", "\n", "if choice == \"1\":\n", " height = float(input(\"Enter height: \"))\n", " base = float(input(\"Enter base: \"))\n", " hypotenuse = (height**2 + base**2) ** 0.5\n", " print(f\"The hypotenuse is: {hypotenuse:.2f}\")\n", "\n", "else:\n", " known_side = input(\"Which side do you know? (height or base): \").lower()\n", " if known_side == \"height\":\n", " height = float(input(\"Enter height: \"))\n", " hypotenuse = float(input(\"Enter hypotenuse c: \"))\n", " if hypotenuse > height:\n", " base = (hypotenuse**2 - height**2) ** 0.5\n", " print(f\"The base is: {base:.2f}\")\n", " else:\n", " print(\"โŒ Hypotenuse must be greater than height.\")\n", "\n", " elif known_side == \"base\":\n", " base = float(input(\"Enter base: \"))\n", " hypotenuse = float(input(\"Enter hypotenuse c: \"))\n", " if hypotenuse > base:\n", " height = (hypotenuse**2 - base**2) ** 0.5\n", " print(f\"The height is: {height:.2f}\")\n", " else:\n", " print(\"โŒ Hypotenuse must be greater than base.\")\n", "\n", " else:\n", " print(\"โŒ Invalid choice. Please enter 'height' or 'base'.\")" ], "metadata": { "id": "vrYHjc3qK-wo", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "f726d7d1-1cff-4c95-aa37-1c69c0546201" }, "execution_count": 4, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐Ÿ“ Welcome to the Pythagoras Theorem Calculator!\n", "You can calculate:\n", "1. Hypotenuse\n", "2. One of the sides (height or base)\n", "Enter 1 to find hypotenuse, 2 to find a side: 1\n", "Enter height: 4\n", "Enter base: 3\n", "The hypotenuse is: 5.00\n" ] } ] }, { "cell_type": "code", "source": [ "# Application 5 - Pizza Ordering App\n", "\n", "print(\"๐Ÿ• Welcome to the Pizza Ordering App!\")\n", "\n", "print(\"Choose your pizza type:\")\n", "print(\"1. Margherita - โ‚น200\")\n", "print(\"2. Pepperoni - โ‚น250\")\n", "print(\"3. Veggie - โ‚น230\")\n", "print(\"4. BBQ Chicken - โ‚น280\")\n", "pizza_type = input(\"Enter the number for the pizza type: \")\n", "\n", "if pizza_type == \"1\":\n", " pizza_name = \"Margherita\"\n", " pizza_price = 200\n", "elif pizza_type == \"2\":\n", " pizza_name = \"Pepperoni\"\n", " pizza_price = 250\n", "elif pizza_type == \"3\":\n", " pizza_name = \"Veggie\"\n", " pizza_price = 230\n", "elif pizza_type == \"4\":\n", " pizza_name = \"BBQ Chicken\"\n", " pizza_price = 280\n", "else:\n", " print(\"โŒ Invalid choice.\")\n", " pizza_price = 0\n", "\n", "if pizza_price > 0:\n", " print(\"\\nChoose your pizza size:\")\n", " print(\"1. Small - โ‚น0 (Base price)\")\n", " print(\"2. Medium - โ‚น50 extra\")\n", " print(\"3. Large - โ‚น100 extra\")\n", " size_choice = input(\"Enter 1, 2, or 3: \")\n", "\n", " if size_choice == \"1\":\n", " size_price = 0\n", " size_name = \"Small\"\n", " elif size_choice == \"2\":\n", " size_price = 50\n", " size_name = \"Medium\"\n", " elif size_choice == \"3\":\n", " size_price = 100\n", " size_name = \"Large\"\n", " else:\n", " print(\"โŒ Invalid size choice.\")\n", " size_price = 0\n", "\n", "if size_price >= 0:\n", " print(\"\\nChoose your toppings (โ‚น30 each):\")\n", " print(\"1. Olives\")\n", " print(\"2. Mushrooms\")\n", " print(\"3. Jalapeรฑos\")\n", " print(\"4. Extra Cheese\")\n", "\n", " olives = input(\"Do you want Olives? (y/n): \").lower()\n", " mushrooms = input(\"Do you want Mushrooms? (y/n): \").lower()\n", " jalapenos = input(\"Do you want Jalapeรฑos? (y/n): \").lower()\n", " extra_cheese = input(\"Do you want Extra Cheese? (y/n): \").lower()\n", "\n", " toppings_price = 0\n", " selected_toppings = \"\"\n", "\n", " if olives == \"y\":\n", " toppings_price += 30\n", " selected_toppings += \"Olives, \"\n", " if mushrooms == \"y\":\n", " toppings_price += 30\n", " selected_toppings += \"Mushrooms, \"\n", " if jalapenos == \"y\":\n", " toppings_price += 30\n", " selected_toppings += \"Jalapeรฑos, \"\n", " if extra_cheese == \"y\":\n", " toppings_price += 30\n", " selected_toppings += \"Extra Cheese, \"\n", "\n", " if selected_toppings:\n", " selected_toppings = selected_toppings[:-2] # Remove trailing comma and space\n", "\n", "if pizza_price > 0 and size_price >= 0:\n", " total_price = pizza_price + size_price + toppings_price\n", "\n", " print(\"\\n๐Ÿ’ณ Choose Payment Method:\")\n", " print(\"1. Cash on Delivery\")\n", " print(\"2. UPI\")\n", " print(\"3. Card Payment\")\n", " payment_method = input(\"Enter 1, 2, or 3: \")\n", "\n", " if payment_method == \"1\":\n", " payment_mode = \"Cash on Delivery\"\n", " elif payment_method == \"2\":\n", " payment_mode = \"UPI\"\n", " elif payment_method == \"3\":\n", " payment_mode = \"Card Payment\"\n", " else:\n", " payment_mode = \"Invalid choice\"\n", "\n", " print(\"\\n๐Ÿงพ Final Bill\")\n", " print(f\"Pizza: {pizza_name} ({size_name})\")\n", " print(f\"Toppings: {selected_toppings if selected_toppings else 'None'}\")\n", " print(f\"Total: โ‚น{total_price}\")\n", " print(f\"Payment Mode: {payment_mode}\")\n", "\n", " print(\"\\nโœ… Thank you for ordering with us! Your pizza is on the way!\")\n", "else:\n", " print(\"โŒ Please restart and choose a valid pizza type.\")\n" ], "metadata": { "id": "zUVPa6O0K-y_", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "b69362e3-8722-4b62-88a2-312646367946" }, "execution_count": 5, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐Ÿ• Welcome to the Pizza Ordering App!\n", "Choose your pizza type:\n", "1. Margherita - โ‚น200\n", "2. Pepperoni - โ‚น250\n", "3. Veggie - โ‚น230\n", "4. BBQ Chicken - โ‚น280\n", "Enter the number for the pizza type: 3\n", "\n", "Choose your pizza size:\n", "1. Small - โ‚น0 (Base price)\n", "2. Medium - โ‚น50 extra\n", "3. Large - โ‚น100 extra\n", "Enter 1, 2, or 3: 2\n", "\n", "Choose your toppings (โ‚น30 each):\n", "1. Olives\n", "2. Mushrooms\n", "3. Jalapeรฑos\n", "4. Extra Cheese\n", "Do you want Olives? (y/n): y\n", "Do you want Mushrooms? (y/n): n\n", "Do you want Jalapeรฑos? (y/n): y\n", "Do you want Extra Cheese? (y/n): y\n", "\n", "๐Ÿ’ณ Choose Payment Method:\n", "1. Cash on Delivery\n", "2. UPI\n", "3. Card Payment\n", "Enter 1, 2, or 3: 2\n", "\n", "๐Ÿงพ Final Bill\n", "Pizza: Veggie (Medium)\n", "Toppings: Olives, Jalapeรฑos, Extra Cheese\n", "Total: โ‚น370\n", "Payment Mode: UPI\n", "\n", "โœ… Thank you for ordering with us! Your pizza is on the way!\n" ] } ] }, { "cell_type": "code", "source": [ "# Application 6 - College Admission Form\n", "\n", "print(\"๐ŸŽ“ Welcome to the College Admission Form!\")\n", "\n", "print(\"\\nPlease provide your personal details:\")\n", "\n", "name = input(\"Enter your full name: \")\n", "age = input(\"Enter your age: \")\n", "gender = input(\"Enter your gender (M/F/O): \")\n", "email = input(\"Enter your email address: \")\n", "contact = input(\"Enter your contact number: \")\n", "\n", "print(\"\\nPlease provide your academic details:\")\n", "\n", "high_school = input(\"Enter your high school name: \")\n", "graduation_percentage = input(\"Enter your graduation percentage (if applicable): \")\n", "\n", "print(\"\\nChoose the course you'd like to apply for:\")\n", "print(\"1. Computer Science - โ‚น10000\")\n", "print(\"2. Mechanical Engineering - โ‚น12000\")\n", "print(\"3. Business Administration - โ‚น9000\")\n", "print(\"4. Civil Engineering - โ‚น11000\")\n", "course_choice = input(\"Enter the number for the course: \")\n", "\n", "if course_choice == \"1\":\n", " course_name = \"Computer Science\"\n", " course_fee = 10000\n", "elif course_choice == \"2\":\n", " course_name = \"Mechanical Engineering\"\n", " course_fee = 12000\n", "elif course_choice == \"3\":\n", " course_name = \"Business Administration\"\n", " course_fee = 9000\n", "elif course_choice == \"4\":\n", " course_name = \"Civil Engineering\"\n", " course_fee = 11000\n", "else:\n", " print(\"โŒ Invalid course selection.\")\n", " course_name = \"\"\n", " course_fee = 0\n", "\n", "hostel_option = input(\"\\nDo you want to apply for hostel accommodation? (yes/no): \").lower()\n", "if hostel_option == \"yes\":\n", " hostel_fee = 5000\n", "else:\n", " hostel_fee = 0\n", "\n", "if course_fee > 0:\n", " total_fee = course_fee + hostel_fee\n", "\n", " print(\"\\n๐Ÿ’ณ Choose Payment Method:\")\n", " print(\"1. Credit/Debit Card\")\n", " print(\"2. Net Banking\")\n", " print(\"3. UPI\")\n", " payment_choice = input(\"Enter 1, 2, or 3: \")\n", "\n", " if payment_choice == \"1\":\n", " payment_method = \"Credit/Debit Card\"\n", " elif payment_choice == \"2\":\n", " payment_method = \"Net Banking\"\n", " elif payment_choice == \"3\":\n", " payment_method = \"UPI\"\n", " else:\n", " print(\"โŒ Invalid payment method.\")\n", " payment_method = \"Invalid choice\"\n", "\n", "if course_fee > 0 and payment_method != \"Invalid choice\":\n", " print(\"\\n๐Ÿ“ Application Summary\")\n", " print(f\"Name: {name}\")\n", " print(f\"Age: {age}\")\n", " print(f\"Gender: {gender}\")\n", " print(f\"Email: {email}\")\n", " print(f\"Contact Number: {contact}\")\n", " print(f\"High School: {high_school}\")\n", " print(f\"Graduation Percentage: {graduation_percentage}%\")\n", " print(f\"Course Applied: {course_name}\")\n", " print(f\"Hostel Accommodation: {'Yes' if hostel_option == 'yes' else 'No'}\")\n", " print(f\"Total Fee: โ‚น{total_fee}\")\n", " print(f\"Payment Method: {payment_method}\")\n", "\n", " confirm = input(\"\\nDo you confirm your application? (yes/no): \").lower()\n", " if confirm == \"yes\":\n", " print(\"\\nโœ… Your application has been successfully submitted! You will receive a confirmation email shortly.\")\n", " else:\n", " print(\"\\nโŒ Your application has been canceled.\")\n", "\n", "else:\n", " print(\"โŒ Please start again and choose valid options.\")\n" ], "metadata": { "id": "Rlco1lCcK-1c", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "34710e6e-a153-4a34-ae6c-218cee71dafb" }, "execution_count": 6, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐ŸŽ“ Welcome to the College Admission Form!\n", "\n", "Please provide your personal details:\n", "Enter your full name: Ziva Dhoni\n", "Enter your age: 18\n", "Enter your gender (M/F/O): F\n", "Enter your email address: zivadhoni@gmail.com\n", "Enter your contact number: 1234567890\n", "\n", "Please provide your academic details:\n", "Enter your high school name: MS Dhoni Global School\n", "Enter your graduation percentage (if applicable): 97%\n", "\n", "Choose the course you'd like to apply for:\n", "1. Computer Science - โ‚น10000\n", "2. Mechanical Engineering - โ‚น12000\n", "3. Business Administration - โ‚น9000\n", "4. Civil Engineering - โ‚น11000\n", "Enter the number for the course: 1\n", "\n", "Do you want to apply for hostel accommodation? (yes/no): no\n", "\n", "๐Ÿ’ณ Choose Payment Method:\n", "1. Credit/Debit Card\n", "2. Net Banking\n", "3. UPI\n", "Enter 1, 2, or 3: 2\n", "\n", "๐Ÿ“ Application Summary\n", "Name: Ziva Dhoni\n", "Age: 18\n", "Gender: F\n", "Email: zivadhoni@gmail.com\n", "Contact Number: 1234567890\n", "High School: MS Dhoni Global School\n", "Graduation Percentage: 97%%\n", "Course Applied: Computer Science\n", "Hostel Accommodation: No\n", "Total Fee: โ‚น10000\n", "Payment Method: Net Banking\n", "\n", "Do you confirm your application? (yes/no): yes\n", "\n", "โœ… Your application has been successfully submitted! You will receive a confirmation email shortly.\n" ] } ] }, { "cell_type": "code", "source": [ "# Application 7 - IPL Ticket Booking App\n", "\n", "print(\"๐Ÿ Welcome to the IPL Ticket Booking Application!\")\n", "\n", "print(\"\\nPlease provide your personal details:\")\n", "\n", "name = input(\"Enter your full name: \")\n", "email = input(\"Enter your email address: \")\n", "contact = input(\"Enter your contact number: \")\n", "\n", "print(\"\\nChoose the IPL match you'd like to attend:\")\n", "print(\"1. Chennai Super Kings vs Mumbai Indians\")\n", "print(\"2. Royal Challengers Bangalore vs Delhi Capitals\")\n", "print(\"3. Kolkata Knight Riders vs Rajasthan Royals\")\n", "print(\"4. Sunrisers Hyderabad vs Punjab Kings\")\n", "match_choice = input(\"Enter the number for the match: \")\n", "\n", "if match_choice == \"1\":\n", " match_name = \"Mumbai Indians vs Chennai Super Kings\"\n", " match_date = \"01-05-2025\"\n", " match_fee = 1000\n", "elif match_choice == \"2\":\n", " match_name = \"Royal Challengers Bangalore vs Delhi Capitals\"\n", " match_date = \"02-05-2025\"\n", " match_fee = 1200\n", "elif match_choice == \"3\":\n", " match_name = \"Kolkata Knight Riders vs Rajasthan Royals\"\n", " match_date = \"03-05-2025\"\n", " match_fee = 1100\n", "elif match_choice == \"4\":\n", " match_name = \"Sunrisers Hyderabad vs Punjab Kings\"\n", " match_date = \"04-05-2025\"\n", " match_fee = 950\n", "else:\n", " print(\"โŒ Invalid match selection.\")\n", " match_name = \"\"\n", " match_date = \"\"\n", " match_fee = 0\n", "\n", "if match_fee > 0:\n", " print(\"\\nChoose your ticket type:\")\n", " print(\"1. General Admission - โ‚น\" + str(match_fee))\n", " print(\"2. VIP - โ‚น1500\")\n", " print(\"3. Platinum - โ‚น2000\")\n", " ticket_choice = input(\"Enter 1, 2, or 3: \")\n", "\n", " if ticket_choice == \"1\":\n", " ticket_type = \"General Admission\"\n", " ticket_price = match_fee\n", " elif ticket_choice == \"2\":\n", " ticket_type = \"VIP\"\n", " ticket_price = 1500\n", " elif ticket_choice == \"3\":\n", " ticket_type = \"Platinum\"\n", " ticket_price = 2000\n", " else:\n", " print(\"โŒ Invalid ticket type selection.\")\n", " ticket_type = \"\"\n", " ticket_price = 0\n", "\n", "if ticket_price > 0:\n", " print(\"\\n๐Ÿ’ณ Choose Payment Method:\")\n", " print(\"1. Credit/Debit Card\")\n", " print(\"2. Net Banking\")\n", " print(\"3. UPI\")\n", " payment_choice = input(\"Enter 1, 2, or 3: \")\n", "\n", " if payment_choice == \"1\":\n", " payment_method = \"Credit/Debit Card\"\n", " elif payment_choice == \"2\":\n", " payment_method = \"Net Banking\"\n", " elif payment_choice == \"3\":\n", " payment_method = \"UPI\"\n", " else:\n", " print(\"โŒ Invalid payment method.\")\n", " payment_method = \"Invalid choice\"\n", "\n", "if ticket_price > 0 and payment_method != \"Invalid choice\":\n", " print(\"\\n๐Ÿ“ Ticket Booking Summary\")\n", " print(f\"Name: {name}\")\n", " print(f\"Email: {email}\")\n", " print(f\"Contact Number: {contact}\")\n", " print(f\"Match: {match_name}\")\n", " print(f\"Match Date: {match_date}\")\n", " print(f\"Ticket Type: {ticket_type}\")\n", " print(f\"Total Price: โ‚น{ticket_price}\")\n", " print(f\"Payment Method: {payment_method}\")\n", "\n", " confirm = input(\"\\nDo you confirm your ticket booking? (yes/no): \").lower()\n", " if confirm == \"yes\":\n", " print(\"\\nโœ… Your ticket has been successfully booked! Enjoy the match!\")\n", " else:\n", " print(\"\\nโŒ Your ticket booking has been canceled.\")\n", "\n", "else:\n", " print(\"โŒ Please restart and choose valid options.\")\n" ], "metadata": { "id": "xXxvzKxxK-30", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "a3609f5c-731e-4ee8-8a19-cb3ed7fa558b" }, "execution_count": 7, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "๐Ÿ Welcome to the IPL Ticket Booking Application!\n", "\n", "Please provide your personal details:\n", "Enter your full name: MS Dhoni\n", "Enter your email address: mahi@gmail.com\n", "Enter your contact number: 9876543210\n", "\n", "Choose the IPL match you'd like to attend:\n", "1. Chennai Super Kings vs Mumbai Indians\n", "2. Royal Challengers Bangalore vs Delhi Capitals\n", "3. Kolkata Knight Riders vs Rajasthan Royals\n", "4. Sunrisers Hyderabad vs Punjab Kings\n", "Enter the number for the match: 1\n", "\n", "Choose your ticket type:\n", "1. General Admission - โ‚น1000\n", "2. VIP - โ‚น1500\n", "3. Platinum - โ‚น2000\n", "Enter 1, 2, or 3: 2\n", "\n", "๐Ÿ’ณ Choose Payment Method:\n", "1. Credit/Debit Card\n", "2. Net Banking\n", "3. UPI\n", "Enter 1, 2, or 3: 1\n", "\n", "๐Ÿ“ Ticket Booking Summary\n", "Name: MS Dhoni\n", "Email: mahi@gmail.com\n", "Contact Number: 9876543210\n", "Match: Mumbai Indians vs Chennai Super Kings\n", "Match Date: 01-05-2025\n", "Ticket Type: VIP\n", "Total Price: โ‚น1500\n", "Payment Method: Credit/Debit Card\n", "\n", "Do you confirm your ticket booking? (yes/no): yes\n", "\n", "โœ… Your ticket has been successfully booked! Enjoy the match!\n" ] } ] } ] }