repl.it
@21natzil/

Debug Example

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import requests


def get_data():
  with requests.Session() as session:
    with session.get(f"http://httpbin.org/encoding/utf8") as resp:
      return resp.content.decode('ascii')

def handle_math(min_number: int, max_number: int):
  try:
    print(
      get_data()[0] * int(min_number / max_number)
    )
    return (min_number / max_number)
  except:
    print("The max number cannot be 0")

numbers = [0, 1, 2, 3]

for i in range(len(numbers)):
  r = handle_math(5, 1)
  numbers.insert(0, r)