Paper 1 Web Applications Drills
These are original Paper 1-style practice questions. They use concrete web-app examples so the answers can be checked exactly.
Detailed answers are in Paper 1 Web Applications Answers.
Revise the topic hub first:
Questions
Question 1: Web vs Native
A school wants an attendance system that teachers can use on any laptop without installing software. Another team wants a camera app that works offline and uses device-specific camera controls.
Compare web and native applications for these two situations. [4]
Question 2: Usability
A login form has two text boxes but no labels. If the password is wrong, it shows only "Error".
State two usability improvements and explain briefly how each improvement helps the user. [4]
Question 3: HTML Form Name Attribute
Consider this form input:
<input type="text" name="student_name">In Flask, the route reads:
name = request.form["student_name"]Explain the purpose of the name attribute. [2]
Question 4: GET vs POST
A search form sends a keyword to display matching library books. A login form sends a username and password.
Compare whether GET or POST is more suitable for each form. [4]
Question 5: Flask Route
Study the Flask code.
@app.route("/status")
def status():
return "OK"Explain what URL path is handled and what response is returned. [2]
Question 6: Jinja Variable
Study the route and template fragment.
return render_template("profile.html", username="Asha")<h1>{{ username }}</h1>State what appears inside the <h1> element and explain how the value reaches the template. [3]
Question 7: Static Files
A Flask project has this file:
static/style.cssWrite the Jinja expression commonly used inside href to link this stylesheet. [1]
Question 8: Template Folder
A route uses:
return render_template("home.html")The file is saved as:
template/home.htmlExplain why this may fail in a normal Flask project and state the corrected folder name. [2]
Question 9: Upload Risk
A Flask app allows users to upload profile pictures. A user uploads a file named profile.exe.
Explain one risk of accepting profile.exe and describe two checks or controls the server should apply before saving an uploaded profile picture. [4]
Question 10: Local Testing
Before submitting a Flask app using templates, static CSS, and SQLite, give two checks that should be performed locally. [2]
Review Checklist
After attempting these questions, check whether you can:
- distinguish web and native app suitability;
- explain Flask route, template, form, and static-file conventions;
- choose GET or POST based on data visibility and purpose;
- identify upload risks and mitigations;
- plan local checks before submission.