Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NEED HELP!!! DON'T UNDERSTAND WHAT I'M BEING ASKED TO DO AT THIS POINT To process the form, define a new function encrypt in main.py. Add

NEED HELP!!!

DON'T UNDERSTAND WHAT I'M BEING ASKED TO DO AT THIS POINT

To process the form, define a new function encrypt in main.py. Add an @app.route decorator to configure the function to receive requests at the root path "/", and with methods=['POST'].

When the form is submitted, the request will contain the parameters rot and text. In order to access these, we need Flask's request object. To import it, modify the topmost import statement to include this object.

from flask import Flask, request

Within encrypt, store the values of these request parameters in local variables, converting data types as necessary. Then, encrypt the value of the text parameter using rotate_string. Return the encrypted string wrapped in

tags, to be rendered in the browser.

MY CODE SO FAR

from flask import Flask, request

from caesar import rotate_string

app = Flask(__name__)

app.config['DEBUG'] = True

form= """

Rotate by:

"""

@app.route("/")

def index():

return form

app.run()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago