You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
380 B
Python

from flask import Flask
from random import randint
from py_project.calculator import Calculator
app = Flask(__name__)
my_calculator = Calculator()
@app.route("/")
def index():
num1 = randint(0, 100)
num2 = randint(0, 100)
_sum = my_calculator.add(num1, num2)
message = f" {num1} + {num2} = {_sum}"
return message
if __name__ == "__main__":
app.run()