• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Code help (1 Viewer)

thingybot

New Member
Joined
Oct 20, 2015
Messages
1
Gender
Undisclosed
HSC
N/A
I need to make a program in visual basic that randomly picks and asks 3 true or false questions from a list of questions. Questions and answer have to be read from a text file. I know the basics of using visual studio but for this I don't know where to start.
 

sy37

Active Member
Joined
Jun 22, 2014
Messages
323
Gender
Male
HSC
2015
If it means anything I can show you how to do it using Python, haven't used VB in ages...

follow astroman's link or programmers.stackexchange, whichever...
 

happyhunter

Member
Joined
Jul 30, 2013
Messages
88
Gender
Male
HSC
2015
I need to make a program in visual basic that randomly picks and asks 3 true or false questions from a list of questions. Questions and answer have to be read from a text file. I know the basics of using visual studio but for this I don't know where to start.
Read out the list into a dictionary (Splitting the question and answer) and pick and display a random number question from the dictionary.
 

JavaScript

Member
Joined
Oct 16, 2015
Messages
83
Gender
Male
HSC
2015
Ah man. The days of VB.
So glad I stopped using it.

I'd recommend stop using it asap since it teaches you bad coding habits. Learn c# or c++ if you like visual studio or Python if you are into Linux.
 
Joined
Jan 22, 2015
Messages
113
Gender
Male
HSC
2015
You could potentially start by writing the questions and answers into two different text files (if that's what your question is asking and if that's what you're stuck on?) lol
Have the questions and answers read into two separate arrays or something, and then just use the random function which could pick out a question on the random, nth element. User types answer in, answer is compared to the nth answer in the answer array. Something similar idk.
I don't know much about VB/coding in general, but I'm pretty sure VB has all the functions you need.
Good luck haha!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top