Coder Social home page Coder Social logo

test-exam-generator's Introduction

Test-Exam-Generator

Generate interactive (Beta version in console) test exams providing a text file with the suitable format. Created with Python37

How to use?

It is thought to be very simple and useful.

You only need a file in .txt with the adequate format (See The Format section)

python TestGen.py {filename}

example :

python TestGen.py TestExample

(The .txt is included in the program, so you don't need to write it again)

File format

Remember to use a txt file

If you have a pdf file try a website converter (example : https://www.pdf2go.com) or something like this script

https://gist.github.com/vinovator/c78c2cb63d62fdd9fb67

Useful variables

I've created this tool thinking that not all test are the same, so u could need to personalize this program. To make it easier these are the variables u can control :

Number of options (a,b,c,d) = 4

numOpciones = 4

The word that delimits the solutions (See the format section)

WORD = "RESPUESTAS"

If you have some dir with exams, for example.

/home/user/exams

  • /exam1
  • /exam2

You could set RUTA = "/home/user/exams/" so you only would need to enter the name of the file and not the full path

RUTA = ''

The Format

This tool tries to be universal, but due to variety of exams that exists, we need to follow a little format in order to make this program work correctly.

Questions:

Should start with

NUMBER) or NUMBER.

Answers

Should start with

a) or a. 
(Also working with caps)

Solutions

There are many ways of specify the solutions of the test. I recomend to follow one of these:

1 a
1-a
1- a
1. d.
etc...
(Also working with caps)

In the script i specified a word to delimit the start of the solutions. It is "RESPUESTAS" but u can change that with a little modification of the code.

Simple example of the format

Questions and Answers example

alt text

Solutions example

alt text

Working sample

alt text

TODO

  • Format code, make it readable (I'm a mess, sorry)
  • Run some tests with many files
  • Try to improve the pdf to txt tool.
  • GUI or User friendly interface (HTML or TKINTER)

test-exam-generator's People

Contributors

antooro avatar

Watchers

James Cloos avatar

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.