Quiz Program - Asking Five Questions With Yes Or No Answer

Mar 19, 2009

I'm trying to make a quiz application with Visual Basic at the moment. I want to write a routine that asks five questions to which the answer must be either Yes or No. It must add up the number of Nos and if the number of Ns is less than two then print out "pessimist", otherwise print out "optimist". So far this is the design of what I've done. [URL]. However, I have no code which I've produced on my own.

Code:
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class

I really don't know how I can kind of add up all the results from each individual question, seeing as radio buttons are used.

View 2 Replies


ADVERTISEMENT

Multiple Choice Quiz - Make Some Arrays Like Questions(20) And Answers(20)?

Mar 4, 2011

trying to make a Multiple Choice quiz, with 20 questions

-4 RadioButtons

-2 Label (Reading the Questions) and 1, keeping a score count

Do I wanna make some arrays like Questions(20) and Answers(20)

Dim ScoreCount as Integer

So I want it to be a little screen, and once you click a Radiobutton to choose answer, it will change the label to Question(2) so forth.. but I am unsure how to do this. I am fairly new to vb, im doing this to learn.How do I make it so everytime you click a radiobutton wether it's right or wrong, the next question and possible answers all change??

View 1 Replies

Randomly Select The Questions W/ Answer In Database(mysql)?

Aug 28, 2011

I'm started my project and here is my code.

con.Close()
con.Open()
com.CommandText = "SELECT * from math.questions where number ORDER by rand() limit 1"

[code].....

View 1 Replies

Making Quiz - Assigning Point Value To Variable Depending On Answer

Nov 15, 2010

I am thinking is to have a question, then between 2-4 answers, and depending on the answer a point value gets assigned to a variable, but then when that one question is answered you can click a button that moves to a next page type of thing with a new question on it. I think I could probably figure most of this out but when it comes to switching to a different question I am not sure how I would do that.

View 11 Replies

VS 2010 Randomizing - Program Randomly Choose Questions - NEVER Choose Same Question In Same Program

Dec 20, 2011

I am currently working on a family project which is based on "Who Wants To Be A Millionaire?" show. There is a huge diffrence between the show and my project. My project is a christmas edition and the goal is not to get money or something, since I will not add it... Erhmm... Let me get to the point. I have already designed a layout and scripted some things. I have about thirty questions but I do not want them to always spawn in the same array, if you know what I mean. I want the program to randomly choose one of those thirty questions and NEVER choose the same question in the same program run. By the way, there are four options on my project: A, B, C and D. I have got everything, I just need a code.

View 3 Replies

VS 2008 : Setting Up Quiz Program?

Apr 3, 2009

I'm trying to make a quiz application with Visual Basic at the moment. I want to write a routine that asks five questions to which the answer must be either Yes or No. It must add up the number of Nos and if the number of Ns is less than two then print out �pessimist�, otherwise print out �optimist�.I'm only at the very beginning stage of the program, I've created the design of it but I'm not too sure whether the code concept for the radio buttons is right. How can I expand on this?

Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim numberOfNos As Integer = 0

[code]....

View 8 Replies

Program That Fills A 2D Array With Quiz Scores?

Jan 27, 2011

I want to write a quick program that fills a 2D array with quiz scores. Consider there is 5 Students and each have completed 3 Quizes. I want the program to display a class average as well as a student average.

I've gotten as far as a nested for/next loop but I am stumbling over the language for accumulating and displaying the average.[code]...

View 2 Replies

Program Giving Wrong Answer

May 7, 2009

I'm currently creating a maths game for primary school children and have questions based on addition, subtraction, division and multiplication.I tried it out yesterday and if I type in the correct answer, I get told it's wrong, but if I type in the in the number I'm dividing by, as the answer it comes up as correct. How do I change this so that the correct answer is actually the correct answer?

View 2 Replies

VS 2010 Developing A 'question-answer' Program?

Sep 3, 2011

developing a program in Visual Basic 2010 to help with my study in school. I would like to develop a program whereby the user is asked to input the correct answer to a question; if the answer is correct the next question comes up if it is incorrect the user must try again until the correct answer is given. I would like to have quite a few questions (around 50).

View 6 Replies

Making A Messenger - Program A Slight Delay In The Computer's Answer?

Jan 15, 2010

I'm working on a project where I make a automatic messenger from VBnet. I want to program a simple one that responds to certain words or phrases. However, I only know the rough basics of If...Then commands. I have a lot of problems:

1. How do I make it so the messages typed in the box actually goes up into the script box when I press send?

2. How do I program a slight delay in the computer's answer?

3. How do I set a name to the computer and to me?

4. How do I make the script goes into scrolling when it runs out of space.

5. If possible, when I type an equation in the box, can I program the computer to solve it and display the answer? I'm a beginner so I don't really know the overall organization of this project. However, I would like it to remain as simple as possible.

View 4 Replies

Make Program To Calculate Textbox1.text And Show The Answer In Textbox2

Dec 22, 2011

I am working on bit more advanced calculator, but I cant figure out how I can make my program to calculate textbox1.text and show the answer in textbox2

For example: (textbox1) 5*62+4
(textbox2)314

I'm not sure this question belong in this topic, but I don't know where else it should be?

View 16 Replies

Quadratic Formula Program: "NaN" As Result When Answer(s) Are Negative

Dec 13, 2010

I'm working on a quadratic formula program and when I enter 1 as A, 2 as B, and 1 as A (X should end up being -1), it returns "NaN" in both text boxes.

Here's the code:

CODE:

View 8 Replies

Cannot Get My Questions To Appear On The Buttons On VB 2008

Apr 2, 2012

im stuck programming a visual basic quiz.I cannot get my questions to appear on the buttons on visual basic 2008 and do not not why not.

[code]...

View 15 Replies

Questions About Picturebox And Images?

May 6, 2011

I have made a screensaver in VB.NET. I am running into some roadblocks in the code though. The idea first was to have a ball bounce across my screens. It then evolved into spawning new balls that bounce across the screen. I then added collision detection so they would bounce off each other. Here is the problem that came up:

When said balls overlap each other, you can easily distinguish the edges of the picturebox that holds the images. I have made the background of the picturebox transparent, made the bitmap with a magenta background and made magenta transparent (for the image), but I can still see the picturebox edges when they overlap. It seems the transparency is not only making the background transparent, but giving it X-RAY vision to display not the visible area behind it, but the root background color of the form. here is a sample of the code which makes the transparencies.

Private Sub frmscr_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim bmp As Bitmap = My.Resources._smiley_face_image
Dim clr As Color = Color.FromArgb(255, 0, 128)
bmp.MakeTransparent(clr)

[code].....

I also tried to see if changing the image from background to foreground would help...no such luck.

View 4 Replies

Game Programming :: How To Randomize Questions

Jul 28, 2010

I am making a game on vb.net. It is like a quiz game. In the game there is a button which when pressed pops up a question. The code for the input box is as follows:

Dim Answer As String = ("sodium chloride")
Dim Question = InputBox("You have mixed Sodium and Chloride. What is the ionic bond name of this?", "Question?")

[code]......

View 4 Replies

Generating Random Questions In A Vb2008

Sep 5, 2009

Iam doing a project in vb2008 for a quiz program. i want to randomly generate questions in a textbox a question should occur once in the quiz session. i had my code:

Imports System.Data
Imports System.Data.OleDb
Imports AgentObjects

[CODE]...

View 1 Replies

Creating Array For Multiple Choice Questions

Nov 3, 2011

I am in the process of creating an array for a set of multiple choice questions but I am having a few problems. I am an absolute beginner at VB and I am creating a quiz that users will select one of three possible questions and then depending on their answer a +1 value will be added to the score. However I do not know where my questions and answers are supposed to go, from what I have read online I have to use (0, 1) format to give possible answers but I do not know how I would make the questions and answers display in textboxes on my form. At the bottom of my code I have also included code to randomise the questions although I am unsure as to if it is correct. At the moment I can run my form fine without any problems but my main issue is to how I will get the questions and answers linked to my textboxes on my form.

Public Class frmTest
Private ran As Random = New Random()
Public intScore As Integer
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click
'Turns the message box invisible when start is clicked
lblMessage.Visible = False
[Code] .....

View 5 Replies

Two Dimensional Array - Create A Questionnaire With Questions

May 30, 2012

I need to create a questionnaire with ten questions. The questions can be hard coded as labels. I will have a radio group box for each question, with options, Always, Usually, Sometimes, Seldom and Never. I will then need to store these values for each time that the questionnaire is answered, and another button that will show the question number and the answer count for each question up to that point in time e.g. [Code] I am also assuming I will have a button that when clicked, will identify the active radio button and add 1 to a counter? [Code]

View 13 Replies

Copy And Paste Code A Few Times And Rename The Questions

Dec 31, 2011

A while ago I wrote a quick and very very simple program to test myself on about 10 questions I needed to remember the answer to. I made a form with a label, text box and button. the label contained the question and the answer was entered into the textbox and the button was pressed to check the answer. the code i used was very similar to this:[code] Because I only had 10 questions it was fine to copy and paste the code a few times and rename the questions but now i am going to use this again but for a lot more questions (in the end there will be a couple of hundred) so i was wondering if any one knew a better way to do this? I was thinking maybe an array like 1 to hold the questions and 1 to hold the answers but i haven't worked much with arrays so I'm not sure how difficult this would be ?

View 1 Replies

Retrieve Random Data (questions) From Access 2007 Using Vb 2008?

Mar 3, 2012

how can I retrieve random data(questions) from access 2007 using vb 2008?

View 4 Replies

VS 2008 Script - Form In Which Have Added 5 Questions - Each Question Has 3 Possible Answers

Sep 4, 2009

I got a form in which i have added 5 questions , each question has 3 possible answers , so if a user selects the correct answers then when he hit the OK button he will pass the quest ... if he hit the OK button without having the right answers selected , i want to show him which answers are not correct .. show him which answers he selected ..

View 11 Replies

VS 2008 Creating Game - Randomly Selecting Questions By Clicking Button

Jan 13, 2010

I am creating a "Who wants to be a millionaire" game. Lets say I have 100 questions in a listbox. How can i randomally select a question by clicking a button.

View 11 Replies

Best Way For Creating Quiz

Jun 21, 2010

I would like to create a quiz and wonder what is the best way.

1. Using a textfile to read in the questions/answer
2. Using radio buttons
3. Or something else you suggest?

View 2 Replies

Make Quiz System Using .net?

Mar 31, 2011

I make a 2 questions and then 4 choices for each question..and the 4 choices is made up with radiobutton.. and 1 of the 4 choices is only the right answer..Computing of right answer in each question is the thing that I want to know, how to do..

View 1 Replies

Making A Quiz Using Access?

Aug 11, 2009

I have created my own quiz for my aplication, but, a lot of people asked me , why can't the programe count right or wrong answers and one of them told me can you make a quiz that randomly selects questions?ok, I told them its all posible to make , but I actually coulndt make it working.So, usualy for a classic quiz I got the code to make a button go red if the answer is wrong, but I need the code line for the random question selection and the counting.I found some code but it didn't work,

View 3 Replies

VS 2008 How To Make A Quiz

Mar 11, 2011

I want to make a quiz that generates score and save in access 2007.

View 4 Replies

Create A Quiz Game Application In .NET?

Sep 23, 2010

I am building a quiz application in .net just like on flash mini games, is this possible in .net? and what is the easiest way to create this? make moving objects, cartoon interface and etc. also, it is supposed to be a standalone application.

View 1 Replies

Make A Quiz Result Permanent?

Mar 31, 2009

The Quiz is timed. Its result is in "m:s" format. How to make this result permanent, i.e. when the game is restarted the results would still be there?[cod]e...

View 5 Replies

Make A Quiz Result Sortable?

Apr 2, 2009

Make a Quiz result sortable? Option Strict On[code]...

View 2 Replies

Making A Multiple Choice Quiz?

May 10, 2009

I need a multiple choice quiz but I've ran into some problems. So far i have 5 arrays: one for the questions and four for the answers. The question is displayed in a label and the answers on radio buttons. Problem one: I am using a random number generator to pull them but this allows them to be reused. How do I stop repeats. Problem two, my grading isn't always working.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved