diff --git a/Google Scraper/googlescraper.py b/Google Scraper/googlescraper.py new file mode 100644 index 00000000..b5d89dd7 --- /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()) diff --git a/Tip Calculator/tipcalc.py b/Tip Calculator/tipcalc.py new file mode 100644 index 00000000..044e4817 --- /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}")