quotient cgi exercise modify quotient web exercise (page and save it as cgi script quotient cgi in the same directory where you have localcgiserver py and your output html page template from quotientweb py make quotient cgi take its input from browserrather than the keyboard this means merging all the standard cgi code from adder cgi with the processinput function code from your quotientweb py please keep the same web form data names'xand ' 'as in adder cgiso the main method should not need changes from adder cgi remember to test for syntax errors inside idleand to have the local web server running when you run the cgi script in your browser since we have not yet covered web formstest your cgi script by entering test data into the url in the browser in particular use links the form after trying these linksyou can edit the numbers in the url in the browser to see different results editing html forms this section is continuation of introduction to static pages in kompozer (page )intended for users running kompozer parallel developmentwithout kompozerthat may be simpler is in html source markup (page this section is about html editing using kompozer not about python html forms will allow user-friendly data entry for python cgi scripts this is the last elaboration to allow basic web interactionenter data in formsubmit itand get processed result back from the server the initial exampleadder htmlhad form with only text input fields and submit button inside you will not need anything with further kinds of markup for the exercises now open adder html in kompozer switch to the source view this is short enough page that you should not get lost in the source code the raw text illustrates another feature of htmlattributes the tag to start the form contains not only the tag code formbut also several expressions that look like python assignment statements with string values the names on the left-hand side of the equal signs identify type of attributeand the string value after the equal sign gives the corresponding string value for the attribute the tag for many kinds of input fields is input notice that each field includes name and value attributes (so there is some confusion possible here from the fact the value is the name of particular attributeand all attributes have string as their value will try to use the phrase "string valueconsistently for the second usage see that the 'xand 'ythat are passed in the url by the browser come from the name attribute given in the html code for the corresponding fieldskompozer and other web editors translate your menu selections into the raw html code with proper attribute types this high level editor behavior is convenient to avoid having to learn and debug the exact right html syntaxon the other handusing pop-up field editing windows has the disadvantage that you can only see the attributes of one field at timeand likely need mutiple mouse clicksplus typing particularly if you want to modify number of name or value attributesit is annoying that you need number of mouse clicks to go from one field to the next if you only want to modify the string values assigned to existing attributes like name and valueit may be easier to do in the source windowwhere you can see everything at once (or use separate html source editoras described in html source markup (page making syntax errors in the html source in not very likely if the only changes that you makle to tags are data inside quoted value strings the action url is property of the entire form to edit it in kompozer via the guiright click inside the formbut not on any field elementand select the bottom pop-up choiceform properties then you see window listing the action url and you can change the value to the name of the cgi script that you want to receive the form data when you create your own web formi suggest you make the initial action url be dumpcgi cgi this will allow you to debug your form separate from your cgi script when you have tested that your web form has all the right names and initial valuesyou can change the action url to your cgi script name (like quotient cgi)and go on to test the combination of the form and the cgi scriptif you are modifying previous working formit is likely easier to use the source viewand just replace the value of the form' action attribute to the new cgi file name dynamic web pages