Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello, I have a python lab that I need help with: For this lab, you are to: Write a python script that runs over http.
Hello, I have a python lab that I need help with:
For this lab, you are to:
- Write a python script that runs over http. You may NOT use a separate html file for this lab.
- Generate a form in a function that asks for 2 numbers and has 4 different submits. The submits will be labeled: Add, Subtract, Multiple and Divide.
- If 'Add' is selected, only the sum of the two fields will be neatly output.
- If 'Subtract' is selected, only the difference of the two fields will be neatly output.
- If 'Multiply' is selected, only the product of the two fields will be neatly output.
- If 'Divide' is selected, only the division result of the two fields will be neatly output.
- All the numbers input and output are real numbers treated as floating point.
- Choosing good labels and variables names is important.
- You'll need to submit a link to the script that generates the form.
Possible order to do things.
- Get a form inside a python script running.
- Change the
- Build an 'if-elif' structure in python that 'says' what submit button was pressed.
- Work on 'add' ... you'll need to convert the input to integers (all web input is strings)
- Finish it by copying and modifing add to subtract, etc.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started