Skip to content

Commit

Permalink
Final v0.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
klimenta committed Dec 28, 2020
1 parent d274c8b commit 2439ad7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions README.md
@@ -1,3 +1,32 @@
# GemQuiz
Quiz program in Ruby
Uses Tk

I made this small program when I was playing with Ruby and Tk. You'll need Tk installed in order to get the GUI.
The program is a very primitive quiz type of a program. When the program starts, click on **File | Open** and select a text file with the questions and answers. A sample quiz with 5 questions is provided (test.txt).
At the end you'll get how many questions you guessed correctly and the percentage overall.

![GemQuiz](gemquiz.png)

The quiz has to be in the following format, no blank lines are allowed

Question number
Question text (one continuous line, the program takes care of the wrapping)
Four possible answers, each line starts with A., B., C. and D.
Answer(s) line that starts with the words "Answer: " (no quotes) and the correct answer
The program takes care of single/multiple choice answer widgets

e.g.

Q1.
Leveraged loans are loans provided to companies that already have a significant amount of outstanding debt.
As a banker, how might you compare a leveraged loan to other loans in your portfolio?
A. Higher risk to the lender but less costly to the borrower.
B. Lower risk to the lender and less costly to the borrower.
C. Lower risk to the lender but more costly to the borrower.
D. Higher risk to the lender and more costly to the borrower.
Answer: D

This example will create a quiz with 4 radio buttons. If the answer line was Answer: B,C then the program will show four check buttons instead.

**NOTE:** The question in this example is two lines. In the file, it should be one continuous line

**NOTE:** Do not leave ANY blank lines.
Binary file added gemquiz.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2439ad7

Please sign in to comment.