cool site (mayor stuff)

Python:
import requests

response = requests.get("https://api.perpheads.com/v2/city/info")

data = response.json()

cityMoney = data.get("cityMoney")
cityMoney = round(cityMoney, 1)
salesTax =  data.get("salesTax")
incomeTax =  data.get("incomeTax")
fuelTax = data.get("fuelTax")
vehicleTax = data.get("vehicleTax")
mayorName = data.get("mayorName")

print("Welcome to the Paralake City Mayor terminal!")
print(f"Your mayor's name is: {mayorName}")
print(f"City budget: ${cityMoney}")
print(f"Sales tax: {salesTax}%")
print(f"Income tax: {incomeTax}")
print(f"Fuel tax: {fuelTax}")
print(f"Vehicle tax: {vehicleTax}")

if salesTax >= 20:
    print("Warning: Sales tax is above 20%, therefore, with warning, the mayor can be assassinated.")

Little thing I made. There's probably more efficient ways of doing this, but I don't know what they are lmao.
 
Back
Top