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 python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  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.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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