1. Text Server (1 mark) Setting up: 1. Create your file text_server.py . 2. At the top of the file (above your import st

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. Text Server (1 mark) Setting up: 1. Create your file text_server.py . 2. At the top of the file (above your import st

Post by answerhappygod »

1 Text Server 1 Mark Setting Up 1 Create Your File Text Server Py 2 At The Top Of The File Above Your Import St 1
1 Text Server 1 Mark Setting Up 1 Create Your File Text Server Py 2 At The Top Of The File Above Your Import St 1 (129.86 KiB) Viewed 52 times
1. Text Server (1 mark) Setting up: 1. Create your file text_server.py . 2. At the top of the file (above your import statements), in a comment, include your name and student number. Task: Write a Flask web server that analyses text. On the main page have a textbox and a submit button. If the submit button is pressed, on the next page show an analysis of whatever was in the text box. This analysis should include the number of characters (including spaces and punctuation), the number of characters (excluding punctuation), and the number of words. Note: • All responses the server gives should be in HTML. It is recommended that you use this as an opportunity to familiarise yourself with HTML and PyHTML. • You may use the web servers implemented in lectures as a guide to structuring your code. Step By Step: This section guides you through the implementation of this question for any students who would like it. ► 1. Set up your Flask app. ► 2. Create a function for each route. Update the routes, function names and HTTP methods for each copied function. ►3. For each route, write code to produce the HTML. ▸ 4. Implement additional functionality. ► 5. Test your application works.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply