Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8540147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:31:56+00:00 2026-06-11T11:31:56+00:00

I haven’t programmed in a few years and I’m creating a small quiz to

  • 0

I haven’t programmed in a few years and I’m creating a small quiz to help me drill some vocab terms for schoolwork.

The quiz will look like this

In my file quiz.erb, I have the following:

  • <%= question %>
  • ” type=”text” name=”<%= @name %>” value=”<%= @value %>” />

    In my main file, it_quiz.rb, I have the questions laid out like this (I’m using Sinatra, by the way):

    get '/' do
      @title = 'Italian Quiz'
      @questions = Hash.new
      @questions["a dog"] = ["un cane"]
      @questions["a cat"] = ["un gatto"]
      @questions["hello"] = ["ciao", "salve"]
      @id, @name, @value =
      erb :quiz
    end
    

    As you can see, I don’t have @id, @name, or @value set to anything. What should I set it to? This project may be a bit over my head, (and I know there are plenty of quiz programs out there that would suffice), but I would really like to learn this.

    • 1 1 Answer
    • 0 Views
    • 0 Followers
    • 0
    Share
    • Facebook
    • Report

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    1 Answer

    • Voted
    • Oldest
    • Recent
    • Random
    1. Editorial Team
      Editorial Team
      2026-06-11T11:31:57+00:00Added an answer on June 11, 2026 at 11:31 am

      Melanie,

      Glad you’re working on this, it’s always encouraging to me when I see beginners challenging themselves to learn more and solve their own problems with code.

      I thought about it a bit, and decided the best way to answer this was with a video, because there’s some context and thoughts that went into some of the decisions, so I thought it would be more helpful if they were captured. This makes the answer less generally useful (people can’t quickly scan some text to find an answer), but it’s a pretty specific question anyway, and so it will probably only be helpful to people in a very similar situation to yours, which means the video is probably more helpful for them, too.

      The changes are on github.

      Here is the video.

      If the stuff where I made classes is beyond what you’re familiar with, then you might find Ruby Kickstart useful, it’s a site I made to teach Ruby to beginners (it might move a bit fast for beginners, but given your question, I’d expect you have have the capacity and tenacity to follow along). It’s free, all the materials are open source and easily accessible.

      It also looks like you’re in Chicago, we have a rich Ruby community here in Chicago:

      • you can always come out to the ChicagoRuby events (especially the hack nights) and ask someone for help or feedback.
      • We have Code and Coffee every Tuesday morning, which I go to when I can wake up that early (less often than I’d like to admit) It’s unstructured, but the people are friendly and happy to help.
      • I’m also giving a talk on Nov 28th that is aimed at people around your level of experience, it’s about how to get effective feedback, so you can solve problems like these.

      Hope this helps you. Keep at it, you’re doing well and coding is among the most rewarding things you can learn 🙂

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
        • Report

    Sidebar

    Related Questions

    I haven't designed a website for about 3 years now, so I am quite
    I have just tried to save a simple *.rtf file with some websites and
    I haven't seen this question anywhere else, I hope someone can help. I have
    Haven't touch javascript for 3 years. Just got a javascript project and wanted to
    Haven't done ASP.NET development since VS 2003, so I'd like to save some time
    I haven't touched sharepoint in years. If I want to setup a development environment
    Haven't found a solution to this problem yet, have tried some things... I have
    I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
    Haven't seen anything about it here but it seems to solve one of the
    I haven't used the STL much before, but I started to on this huffman

    Explore

    • Home
    • Add group
    • Groups page
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges
    • Users
    • Help
    • SEARCH

    Footer

    © 2021 The Archive Base. All Rights Reserved
    With Love by The Archive Base

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.