Welcome to the Treehouse Community
Looking to learn something new?
HELP. SO LOST
Is there anyone else out there that didn't even know where to begin with this? I don't even know how to start.
Peter Quin3,200 Points
Start by keeping it simple, one question and one answer, you could begin by having them as just single variables (change to arrays later), use something like an 'if/else' statement to compare if the answer, that you would need to collect via a prompt, is the same as the answer in your variable / array.
Sometimes its a bit overwhelming when starting a project, but what you need to remember is that its all made up of small steps. Work out what you need ('I need answers & questions' = two arrays, 'I need to compare them' = if/else statement) break it down and try to apply what you know to each step.
And message again if you have more question or get stuck (we all do). Hope that helps
Shawn Williams14,750 Points
I found it very helpful to make a list of what I needed to do to program the quiz. I commented this list in my text editor at the top of the code I needed to write. Here is what I listed that really helped me stay organized and be able to write out the code for the quiz step by step.
- Create a two dimensional array to build quiz with at least 3 questions
- Each element of the array will represent one question and one answer.
- Use a loop to cycle through each question and evaluate
- Use a conditional statement to check answers
- Print how many correct answers received to screen */