>tfw I'm trying to create a trivia program

 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
But I don't know how.
HALP PLS


 
Mat Cauthon
| Ravens
 
more |
Did you know that you're a naggerman?


 
True Turquoise
| MILF Hunter
 
more |
XBL: Anora Whisper
PSN: True_Turquoise
Steam: truturquoise
ID: True Turquoise
IP: Logged

25,382 posts
fuck you
You created the Tsunnet


Yu | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Yutaka
IP: Logged

12,707 posts
Almost always, with moderation
Code: [Select]
<?php
$die
=fopen("nothappening.txt""r");
$choke=fgets($die);
fclose($die);

print(
"<p>Burn.</p>");
?>
Last Edit: November 02, 2014, 04:54:22 PM by Yutaka


Ásgeirr | Mythic Inconceivable!
 
more |
XBL: ossku
PSN:
Steam: ossku/Oss
ID: Ossku
IP: Logged

13,542 posts
The angel agreed to trade a set of white wings for the head of another demon. Overjoyed, the demon killed one of his own and plucked the head right off its still-warm body.

The angel then led the demon to heaven, where he underwent centuries of the cruelest tortures imaginable. Finally, the pain was so great that he lost consciousness - at which point his dark wings turned the promised shade of white.
Start from AA2


 
Cheat
| Flora Colossus
 
more |
XBL: Cheatlancer
PSN:
Steam: Cheatlancer
ID: Cheatlancer
IP: Logged

6,657 posts
Hmm...
But I don't know how.
HALP PLS
Really simple if you're doing it on the web. Build a database with a user and questions table and then have a randomizer spit out questions you haven't correctly answered yet.

You could even use a filesystem for this sort of thing, too, since it's simple enough.
Last Edit: November 02, 2014, 04:58:41 PM by Cheat


 
Mat Cauthon
| Ravens
 
more |


Peloi | Member
 
more |
XBL:
PSN:
Steam:
ID: Peloi
IP: Logged

49 posts
Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu Pikachu
Did you try Xbox.com?


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
But I don't know how.
HALP PLS
Really simple if you're doing it on the web. Build a database with a user and questions table and then have a randomizer spit out questions you haven't correctly answered yet.

You could even use a filesystem for this sort of thing, too, since it's simple enough.

Nigga I have no idea what any of that meant.


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
Code: [Select]
<?php
$die
=fopen("nothappening.txt""r");
$choke=fgets($die);
fclose($die);

print(
"<p>Burn.</p>");
?>
System.out.println("You're a faggot.");


 
Cheat
| Flora Colossus
 
more |
XBL: Cheatlancer
PSN:
Steam: Cheatlancer
ID: Cheatlancer
IP: Logged

6,657 posts
Hmm...
But I don't know how.
HALP PLS
Really simple if you're doing it on the web. Build a database with a user and questions table and then have a randomizer spit out questions you haven't correctly answered yet.

You could even use a filesystem for this sort of thing, too, since it's simple enough.

Nigga I have no idea what any of that meant.
Let me just back up...

What are you writing it in?


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
But I don't know how.
HALP PLS
Really simple if you're doing it on the web. Build a database with a user and questions table and then have a randomizer spit out questions you haven't correctly answered yet.

You could even use a filesystem for this sort of thing, too, since it's simple enough.

Nigga I have no idea what any of that meant.
Let me just back up...

What are you writing it in?
Java pleb race


 
Cheat
| Flora Colossus
 
more |
XBL: Cheatlancer
PSN:
Steam: Cheatlancer
ID: Cheatlancer
IP: Logged

6,657 posts
Hmm...
But I don't know how.
HALP PLS
Really simple if you're doing it on the web. Build a database with a user and questions table and then have a randomizer spit out questions you haven't correctly answered yet.

You could even use a filesystem for this sort of thing, too, since it's simple enough.

Nigga I have no idea what any of that meant.
Let me just back up...

What are you writing it in?
Java pleb race
Not familiar with that shit, sorry. :-\


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
But I don't know how.
HALP PLS
Really simple if you're doing it on the web. Build a database with a user and questions table and then have a randomizer spit out questions you haven't correctly answered yet.

You could even use a filesystem for this sort of thing, too, since it's simple enough.

Nigga I have no idea what any of that meant.
Let me just back up...

What are you writing it in?
Java pleb race
Not familiar with that shit, sorry. :-\
omg, I hate this


BioSmiley | Ascended Posting Rampage
 
more |
XBL: BioAwoo
PSN: BioSmiley
Steam: BioAwoo
ID: BioSmiley
IP: Logged

1,327 posts
"In case of fire, choose Charmander"
Try Xbox.com?


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
Try Xbox.com?
No faggot too late My anus is sore I fucking hate you so shut up beetle


Korra | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Avatar Korra
IP: Logged

19,117 posts
uhhh...

- korrie
Try Bungie.net?


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....


Septy | Mythic Inconceivable!
 
more |
XBL: DarkestSeptagon
PSN: Fallfav
Steam:
ID: Septy
IP: Logged

12,027 posts
See you Cowgirl,
Someday, somewhere


BaconShelf | Mythic Inconceivable!
 
more |
XBL: BaconShelf
PSN:
Steam: BaconShelf
ID: BaconShelf
IP: Logged

10,737 posts
 
My advice would be define each question/ answer and the input/ output of such as a function, then give that function a number variable (IE question==1)

Then use a random module to choose a random number between the amount of numbers you assigned and it then run that function.

Or use a list and use the random to select which place in the list it should look, then removing that number from the list.

So (I use python so it would have to be tweaked a bit)

def q1():
    *question 1 function*

def q2():
   *question 2 function*



list[q1,q2]

a=rand.number(0,1)


list[a]



I hope that made sense
Last Edit: November 02, 2014, 05:21:03 PM by BaconShelf


Korra | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Avatar Korra
IP: Logged

19,117 posts
uhhh...

- korrie


Septy | Mythic Inconceivable!
 
more |
XBL: DarkestSeptagon
PSN: Fallfav
Steam:
ID: Septy
IP: Logged

12,027 posts
See you Cowgirl,
Someday, somewhere


BioSmiley | Ascended Posting Rampage
 
more |
XBL: BioAwoo
PSN: BioSmiley
Steam: BioAwoo
ID: BioSmiley
IP: Logged

1,327 posts
"In case of fire, choose Charmander"
Try Xbox.com?
No faggot too late My anus is sore I fucking hate you so shut up beetle
But....but...Allahu...Beetle....


BioSmiley | Ascended Posting Rampage
 
more |
XBL: BioAwoo
PSN: BioSmiley
Steam: BioAwoo
ID: BioSmiley
IP: Logged

1,327 posts
"In case of fire, choose Charmander"


 
Naru
| The Tide Caller
 
more |
XBL: Naru No Baka
PSN:
Steam: The Tide Caller
ID: GasaiYuno
IP: Logged

18,501 posts
The Rage....
My advice would be define each question/ answer and the input/ output of such as a function, then give that function a number variable (IE question==1)

Then use a random module to choose a random number between the amount of numbers you assigned and it then run that function.

Or use a list and use the random to select which place in the list it should look, then removing that number from the list.

So (I use python so it would have to be tweaked a bit)

def q1():
    *question 1 function*

def q2():
   *question 2 function*

q1=1
q2=2

list[1,2]

a=rand.number(0,1)


list[a]



I hope that made sense
omg wat


Korra | Mythic Inconceivable!
 
more |
XBL:
PSN:
Steam:
ID: Avatar Korra
IP: Logged

19,117 posts
uhhh...

- korrie


BaconShelf | Mythic Inconceivable!
 
more |
XBL: BaconShelf
PSN:
Steam: BaconShelf
ID: BaconShelf
IP: Logged

10,737 posts
 
My advice would be define each question/ answer and the input/ output of such as a function, then give that function a number variable (IE question==1)

Then use a random module to choose a random number between the amount of numbers you assigned and it then run that function.

Or use a list and use the random to select which place in the list it should look, then removing that number from the list.

So (I use python so it would have to be tweaked a bit)

def q1():
    *question 1 function*

def q2():
   *question 2 function*

q1=1
q2=2

list[1,2]

a=rand.number(0,1)


list[a]



I hope that made sense
omg wat


I edited the last part because it made no sense.


Essentially, write the question as a function, so it can be called later.

def q1():
        *question and answer input and shit*

def q2():
      *same as above*



Then put those into a list

list[q1,q2]

Then use a random number (In this case 0 or 1) and assign it to a variable

A=rand.number(0,1)

Then use A in the list to recall that function and run it.

list[a]

When I'm on a computer tomorrow I'll write a basic one in python for you to look at if you like. It's kind of hard to explain.
Last Edit: November 02, 2014, 05:26:15 PM by BaconShelf


 
Cheat
| Flora Colossus
 
more |
XBL: Cheatlancer
PSN:
Steam: Cheatlancer
ID: Cheatlancer
IP: Logged

6,657 posts
Hmm...
My advice would be define each question/ answer and the input/ output of such as a function, then give that function a number variable (IE question==1)

Then use a random module to choose a random number between the amount of numbers you assigned and it then run that function.

Or use a list and use the random to select which place in the list it should look, then removing that number from the list.
You could also import a file for questions and a file for answers, and have the matching pair on the same line. That would make it easier to edit them without recompiling the code.


BaconShelf | Mythic Inconceivable!
 
more |
XBL: BaconShelf
PSN:
Steam: BaconShelf
ID: BaconShelf
IP: Logged

10,737 posts
 
My advice would be define each question/ answer and the input/ output of such as a function, then give that function a number variable (IE question==1)

Then use a random module to choose a random number between the amount of numbers you assigned and it then run that function.

Or use a list and use the random to select which place in the list it should look, then removing that number from the list.
You could also import a file for questions and a file for answers, and have the matching pair on the same line. That would make it easier to edit them without recompiling the code.


I'm going off what I know for python, which unfortunately cannot import other files. I just write functions (Or is it modules? I get confused) and then recall them later. It's the next best thing.


 
Cheat
| Flora Colossus
 
more |
XBL: Cheatlancer
PSN:
Steam: Cheatlancer
ID: Cheatlancer
IP: Logged

6,657 posts
Hmm...
My advice would be define each question/ answer and the input/ output of such as a function, then give that function a number variable (IE question==1)

Then use a random module to choose a random number between the amount of numbers you assigned and it then run that function.

Or use a list and use the random to select which place in the list it should look, then removing that number from the list.
You could also import a file for questions and a file for answers, and have the matching pair on the same line. That would make it easier to edit them without recompiling the code.


I'm going off what I know for python, which unfortunately cannot import other files. I just write functions (Or is it modules? I get confused) and then recall them later. It's the next best thing.
Pretty sure you can read an external file in Java.