Skip to content

Typos #4

Description

@sid86-dev

@Khushi0298 in calculator app.py line 15 and 17, check data spelling

from flask import Flask,render_template,request

app=Flask(__name__)

@app.route('/',methods=['GET','POST'])
def index():
    if request.method == "POST":  
        option  = request.form.get('option')
        num1  = request.form.get('num1')
        num2  = request.form.get('num2')

        if option == "Addition":
            data = num1 + num2
        elif option == "subtraction":
            datd = num1 - num2
        elif option == "Division":
            datd = num1 / num2
        elif option == "Multiplication":
            data = num1 * num2
        return render_template('result.html', data=data)
    return render_template('index.html')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem right

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions