PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Random Question Generator
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Random Question Generator

Réponse
 
LinkBack Outils de la discussion
Vieux 22/02/2008, 22h53   #1
Joshua Lefkowitz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Random Question Generator

I am trying to make my own exam simulator, similar to GRE or SAT. I
think I know how to create the pool of questions and answers, but I am
not sure how to create the buttons, how to store the responses and
produce a score at the end, install a timer, etc. I'm a real newbie so
I'm looking for advice as to the best place to begin. I have already
learned the basics using Peter Cooper's Beginng Ruby book.

Thanks for any .
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 22/02/2008, 23h13   #2
Kyle Schmitt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Random Question Generator

Perhaps the first thing is, forget about doing a graphical user
interface until you've got the basics down.

Now, that said, how much have you played around with irb? At this
stage, you'll probably want to just play around with how to store the
questions, the right answer(s), and what you answered. The best way
to play with your data will be in irb.

Try this maybe:
Make a series of hashes that can store the question, one answer and
what you responded.
Write a method to check the answer.
Try making a hash containing several questions.
Write a method to check the % of correctly answered questions in the hash.
Play with it for a few hours.
_now_
Make a class that can store the question, one answer, and what you responded.
Add in methods that check the your response vs the correct one.


And post here if you get stuck
Try and not ask for significantly sized examples, because many (most?
myself included...) people here would gladly try write their own quick
solution to the problem, and then you wouldn't learn much from the
exercise

--Kyle

  Réponse avec citation
Vieux 22/02/2008, 23h46   #3
Joshua Lefkowitz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Random Question Generator

Thanks Kyle! I'll play around with it. If and when I get to the final
product, I'll probably post the relevant portions as open source.
Assuming I get to that level.

--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h24.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08306 seconds with 11 queries