AboutDon Schullian Expertise I`ve worked in BASIC since the Commodore days and maintain a web site part of which is devoted to helping others with thier problems. I`m proficient in all versions of PowerBASIC but cross over to QuickBASIC and Qbasic frequently.
Expert: Don Schullian Date: 5/14/2008 Subject: Writing A Game Show
Question Hey All,
I'm trying to learn how to mess with Qbasic. Right now I think I know the basics but I'm having trouble putting my program together.
Basically I want my program to:
1. Ask a Question
2. Player A and then Player B Answers
3. If A or B or both is right, I want the program to add points to the player's total score.
4. Then move on to Question 2 and so forth.
Thanks,
Johnny.
Answer Hi,
Your question/request is a bit broad to answer the whole thing here so I'll give you an outline then, if need be, we can deal with specific points as they arrise.
You'll need a data base of questions and answers. Your best bet is to use true/false or multiple choice. Essay questions are too difficult to grade. How ever many answers a question has you'll want to put the correct answer as the 1st one stored then shuffle the answers before presenting them.
You'll need to have a short loop for the number of players. Each player will have an element in an array to keep track of the number of correct answers. (Wrong answers can be computed from the total number of questions asked)
This should get you started. Let me know if/when you need some more.