THM Python

https://tryhackme.com/room/pythonbasics

# Code to calcute shipping + cost and if shipping is free (THM code)
shipping_cost_per_kg = 1.20
customer_basket_cost = 34
customer_basket_weight = 44

if(customer_basket_cost >= 100):
  print('Free shipping!')
else:
  shipping_cost = customer_basket_weight * shipping_cost_per_kg
  customer_basket_cost = shipping_cost + customer_basket_cost

print("Total basket cost including shipping is " + str(customer_basket_cost))
# Code to calcute shipping + cost and if shipping is free (My code)
shipping_cost_per_kg = 1.20 
customer_basket_cost = 34
customer_basket_weight = 44

if customer_basket_cost >=100:
  print("FREE SHIPPING")
else:
  shipping_cost = customer_basket_weight * shipping_cost_per_kg
  grand_total = shipping_cost + customer_basket_cost
  
  print("Your grand total, inclduing shipping is: £" + str(grand_total))

Here are some popular libraries you may find useful in scripting as a pentester:

Might need to use Pip like a so: pip install scapy,

Last updated