From 44e5f9df019e142a0b67d1473a78b35c1b3b8990 Mon Sep 17 00:00:00 2001 From: Anukiran Ghosh <59087982+akghosh111@users.noreply.github.com> Date: Sat, 22 Oct 2022 14:16:46 +0530 Subject: [PATCH 1/2] tipcalc.py --- Tip Calculator/tipcalc.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Tip Calculator/tipcalc.py diff --git a/Tip Calculator/tipcalc.py b/Tip Calculator/tipcalc.py new file mode 100644 index 0000000..044e481 --- /dev/null +++ b/Tip Calculator/tipcalc.py @@ -0,0 +1,15 @@ +name = input("What's your name? ") + +print(name) + +total = float(input("What is your bill sub-total?").replace('$','')) + +print(total) + +tip_15 = total * 0.15 +tip_18 = total * 0.18 +tip_20 = total * 0.20 + +print(f"15% is ${tip_15:.2f}") +print(f"18% is ${tip_18:.2f}") +print(f"20% is ${tip_20:.2f}") From 2751b21106682ba08c19279fc79ed873bf7c0c1c Mon Sep 17 00:00:00 2001 From: Anukiran Ghosh <59087982+akghosh111@users.noreply.github.com> Date: Sat, 22 Oct 2022 14:30:45 +0530 Subject: [PATCH 2/2] googlescraper.py --- Google Scraper/googlescraper.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Google Scraper/googlescraper.py diff --git a/Google Scraper/googlescraper.py b/Google Scraper/googlescraper.py new file mode 100644 index 0000000..b5d89dd --- /dev/null +++ b/Google Scraper/googlescraper.py @@ -0,0 +1,10 @@ +from bs4 import BeautifulSoup +import requests + +response = requests.get("http://www.google.com") +soup = BeautifulSoup(response.text, "html.parser") + +links = soup.find_all('a') + +for link in links: + print(link.get_text())