Write a flashcard program that can import cards and quiz you

Assignment Help Python Programming
Reference no: EM132288572

Project - Dictionaries and File IO

The purpose of this assignment is to explore dictionaries and file IO.

Background: Dictionaries give an enriched way to store values by more than just sequential indexes (as lists give us); we identify key-value pairs, and treat keys like indexes of various other types. The only restriction on keys is that they are "hashable", which we can approximate by thinking that they are "immutable all the way down". Though unordered, dictionaries help us simplify many tasks by keeping those key-value associations. Each key can only be paired with one value at a time in a dictionary.

When a file contains text, we can readily write programs to open the file and compute things based on the file's contents. This also gives our programs far more longevity: we can store data and results for later, save user preferences, and all sorts of other useful things.

Problem Statement: What's the best thing for end-of-semester studying? Flashcards! We're going to write a flashcard program that can import cards and quiz you! We'll be doing lots of file input and output (I/O) for this.

Representing a Flashcard, a Deck of Flashcards, and Quiz Statistics - Define the dictionaries formats you will use.

Part 0: Setting Up Your Files

You have been given a code "skeleton" for this project (template.py) which gives the function definitions and "dummy" return statements where needed. This allows the user interface to run before you're finished with your code. Rename this file with your typical username + section-number + P5 format.

You have also been given the user interface for the quiz program (provided.py) which will use your code to drive the program. You can call it much like the tester by putting your filename after when you run it. Below is a sample run. The parts underlined in blue are entered by the user (you) as the program runs.

Part 1: Loading STR Questions from a File

In this part we will be learning to load decks from a save file. Save files have already been provided to you with this document (they are the files with the .deck extension) and in this section we will specifically be working with deck_str.deck. You can open these files with any text editor to see what they look like, you may need to right click the file and select "open with" in some operating systems.

Part 2: Quizzes! (with STR questions only)

Next we're going to do quizzes, so you're going to need to start tracking quiz statistics.

Part 3: More statistics!

We've got quizzes, so let's add some things to tell the user about how they did at the end of the quiz.

Part 4: Shuffling

Quizzes are better if your decks are shuffled. Let's try doing that...

Part 5: Importing New Questions

It turns out that users don't really like entering questions in semicolon-separated format and find it hard to read. Additionally, they don't like having to provide question ids and types for every question. We're going to build them a more "user friendly" import and let them enter questions in this format (see qs_str.txt).

Part 6: Saving

It would be nice if your users could save their imported questions (and it would be annoying to have to import them every time). So let's write .deck files!

Part 7: More Question Types (INT)

Now you've got an entire quiz program! Sadly, we don't have all the question types yet... so let's add them! Let's add the ability to load/record/import/save INT questions.

Part 8: More Question Types (MC)

Let's add the ability to load/record/import/save MC questions.

Attachment:- Assignment Files.rar

Reference no: EM132288572

Questions Cloud

Economy which would require a one world government : The world is increasingly moving towards a one world economy which would require a one world government. Do you think this is a good or bad thing?
Describe the chosen communicable disease and symptoms : Describe the chosen communicable disease, including causes, symptoms, mode of transmission, complications, treatment, and the demographic of interest.
Should minimum wage be raised : Should minimum wage be raised? Support your answer with draliys from the Wall Street journal articles and chapters 9 and 10 of economics
Commercial banking and the securities industry : Do you think that the firewall created by the Glass-Steagall Act of 1933 between commercial banking and the securities industry proved to be a good thing or not
Write a flashcard program that can import cards and quiz you : CS 112 Project - Dictionaries and File IO. The purpose of this assignment is to explore dictionaries and file IO. Write flashcard program that can import cards
Way to reduce the student debt loans in america : What would be an new way to reduce the student debt loans in America? something that has not being implemented yet in our system.
How do horizontal mergers differ from vertical merges : a) How do horizontal mergers differ from vertical merges? b) Which type of merger brings greater antitrust scrutiny and why?
Suppose a firm short-run production function : Suppose a firm's short-run production function is given by Q = 4L0.8. If the production function is Q = L0.8 K0.2, how many units of capital is it using?
Minimize the cost of producing a specific level : An imperfectly competitive firm attempts to minimize the cost of producing a specific level of output Q. Quantity is produced according to the production

Reviews

len2288572

4/20/2019 12:06:17 AM

Instructions: I need to make sure that no one else have the same code. The reason I am asking because my school is really strict on this part. Reminder: Your grade is based significantly on passing test cases. Don't let yourself be "almost done" with a function, but be missing all the test cases! Best practices? Well documented, Good variable names, No globals, and Correct submission etc. Note: If your submission does not run (immediately crashes due to errors), it will receive at most 50%. No exceptions. As stated in our syllabus, turning in running code is essential.

Write a Review

Python Programming Questions & Answers

  Write a password generator in python

Write a password generator in Python. Be creative with how you generate passwords - strong passwords have a mix of lowercase letters, uppercase letters.

  Write a python code for project named virtual election booth

Voter generates a pair of private and public keys - for the purpose of digital signature. Voter uses his private key to sign his request and the public key.

  Write a python program called anagramsearch

Write a Python program called ‘anagramsearch.py' that searches a file for anagrams of a given word, printing the results in alphabetical order.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  Write python program that prompt user to enter integer value

Write a python program that computes the average of 5 numbers. Create 5 variables to store 5 different integers. Prompt the user to input the integers.

  Implement a simplified version of ssl

COMP 4337/9337 - Securing Wireless Networks - Implementation Assignment - Implement a simplified version of SSL/TLS (miniSSL) and a sim-plified application-layer protocol (miniGet) in this project.

  Grade that will calculate and return a student''s exam

Write a function overall Grade that will calculate and return a student's 2316 exam average. It will accept five parameters, which correspond to exam1,2,3,4 and the Final grade. It should replace the lowest exam grade with the 2nd lowest exam grade

  Create a jes function

Create a JES function named level1() and include the relevant behaviours. Specifically, in this level, you only need to detect just one character from the text and the text is only in a single row.

  Write a progra m that creates two objects

Write a progra m that creates two objects, object of the ProductionWorker class and an object of ShiftSupervisor r class.

  Ida to reverse engineer a piece of shellcode

You are a Malware Investigator at 0xC0ff33, Inc and an incident responder came across injected shellcode during an investigation. He has done all he can in IDA and has passed on the .idb file to you. Figure out what the purpose of the malware was ..

  Create a list of valid entries and correct results for sets

Create a list of valid entries and the correct results for each set of entries. Then, make sure that the results are correct when you test with these entries.

  Write a function to evaluate returns the area

Write a function called area_triangle() that takes the height and width of a triangle and returns the area

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd