This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
movie_ids = [ | |
238, 680, 550, 185, 641, 515042, 152532, 120467, 872585, 906126, 840430 | |
] | |
for movie_id in movie_ids: | |
url = f"https://nomad-movies.nomadcoders.workers.dev/movies/{movie_id}" | |
response = requests.get(url) | |
data = response.json() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
while True: | |
num1 = int(input("choose a number: ")) | |
num2 = int(input("choose another one: ")) | |
operation = input("choose an operation:\noptions are : +, -, * or /.\nwrite 'exit' to finish.\n") | |
if operation == "exit": | |
print("Game finished.") | |
break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_yearly_revenue(monthly_revenue): | |
return monthly_revenue * 12 | |
def get_yearly_expenses(monthly_expenses): | |
return monthly_expenses * 12 | |
def get_tax_amount(profit): | |
if profit > 100000: | |
tax_rate = 0.25 | |
else: |