Giter Club home page Giter Club logo

gk-quizs's Introduction

Quiz App

In this project, you'll build a custom quiz app using Flask.

Quiz Apps

Quiz apps are really popular.

Sporcle, for instance, offers tons of different types of quizzes, usually with a timer.

Have you ever taken a Buzzfeed-style Quiz? If you haven't (or even if you have), take a look at These Disney Channel And K-Pop Songs Have The Same Title โ€” Which Do You Prefer?. The quiz isn't really about knowing anything or getting the answer right, it's about entertainment.

Mentimeter is a quiz app for education, and SurveyMonkey is a quiz app for surveys for businesses.

In this project, you'll use what you've learned so far about web apps to make your own quiz app. You can pick any style - you don't have to follow the style any of these apps.

Requirements

  • Your application must use Flask
  • Your application must render a quiz using a template
  • Your application must allow users to answer questions using a form
  • Your application must handle the response to the form, and show the user their results

Starter Code

There is an app.py file that renders a (mostly) empty html template.

Run the app locally with flask run.

Steps

  1. Design your quiz. Brainstorm the topic and write down the questions you want to ask the user.
  2. Write the logic to show your quiz, and run the app to test that your display code works.
  3. Write your quiz as an HTML form. You can write it in HTML directly, or keep the questions in Python and use template variables.
  4. Write the logic to handle form submissions, so that quiz-takers see results after they have submitted the form.

Be sure to test your app and ensure that any inputs that need to be validated are checked. Users should not be able to trigger an application error by entering invalid inputs in the quiz.

Optional

  • You may add styles to the quiz app pages
  • You may use a CSS framework
  • You may render questions from a fixed list in your code, or from a database

Rubric

Points Criteria Description
20 pts Application runs - Application starts with flask run
- Loads the '/' route without errors
20 pts Routes - App uses multiple routes
- GET and POST methods used appropriately
20 pts Templates and forms - App uses different templates for different pages
- App correctly uses form attributes to control form submission
20 pts error handling - App runs without errors
- Inputs are validated appropriately
20 pts logic for questions - Quiz questions are scored appropriately
- User sees the results based on what they entered in the form
10 pts Code is styled well - Indented properly
- Organized effectively
- Appropriately commented
100 Total 110 possible points with the bonus, scored out of 100

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.