Author |
Message |
powerful08
|
Posted: Thu Jan 13, 2011 5:51 pm Post subject: Help With Millionaire Like Game |
|
|
What is it you are trying to achieve?
I"M Trying to make a Trivia Game Like Who wants to be a millionaire
What is the problem you are having?
Is there anyway to put in a code that lets the person playing the game to have the option to remove two of the answers like a Fifty-Fifty and to Call a Friend but no ask the audience without using the Procedure function for anything
Describe what you have tried to solve this problem
i though of it but i cant do it
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing: |
var name : string
var answer1 : string
var score : int
var answer : string
var key : string (1)
var answer2 : string
var answer3 : string
put "Hello Are You Ready To Play The Greatest Comic Book, Sports, Movie"
put "Anime, And Technology Game Ever Made Then Input Your Name If You Dare"
get name
cls
put "Ok Here Are The Rules If You Answer A Question Right You Will Get Points"
put "The Number Of Points Will Depend On The Difficulity Of The Question"
put "If You Get 1 Question Wrong The Computer Will Self-Destruct"
put "If You Understand Press Any Button To Continue"
getch (key )
cls
put "Ok " ..
put name, " For $100 Dollars What Is The Name Of Supermans Home Planet?"
put "1) Krypton"
put "2) Pluto"
put "3) Kryptonia"
put "4) Earth"
put "Please Input The Number Of Your Choice"
get answer1
cls
if answer1 = "1" then
score := + 100
put "Congrats " ..
put name, " You Got This Question Right So Far You Have Won " ..
put score ..
put " Dollars"
getch (key )
cls
elsif answer1 = "2" or answer1 = "3" or answer1 = "4"
then
put "I'm Sorry But That is Incorrect This Computer Will Now Self Destruct"
end if
put " Question 2 For $150 Dollars What Does The Acronym R.A.M Stand For"
put " 1) Restarting Access Memory"
put " 2) Recent Activation Medical"
put " 3) Royal Arch Masonry"
put " 4) Random Access Memory"
get answer
if answer = "4" then
score := + 250
cls
put "Congrats You Got This Question Right So Far You Have Won " ..
put score ..
put " Dollars"
getch (key )
elsif answer = "1" or answer = "2" or answer = "3"
then
put "I'm Sorry But That is Incorrect This Computer Will Now Self Destruct"
end if
cls
put name, " Your Next Question Is About Sports And Its Worth $200 Dollars "
put
"In What Major League Sport Does A City Represent A Entire Country"
put "1) Canadian Football League And The USA"
put "2) National Basketball Association And Canada"
put "3) National Hockey League And Sweeden"
put "4) Major League Baseball And Mexico"
get answer2
if answer2 = "2" then
score := + 450
cls
put "Congrats You Got This Question Right So Far You Have Won " ..
put score ..
put " Dollars"
getch (key )
cls
elsif answer2 not= "2" then
put "I'm Sorry But That is Incorrect This Computer Will Now Self Destruct"
end if
|
thnks
Please specify what version of Turing you are using
Turing 4.1.1 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Jan 13, 2011 6:18 pm Post subject: Re: Help With Millionaire Like Game |
|
|
powerful08 @ Thu Jan 13, 2011 5:51 pm wrote: ...without using the Procedure function for anything
Well functions just make things simpler by allowing you to reuse a piece of code. If, for whatever bizarre reason, you wish to avoid those -- you could just write out the same piece of code every time. Kind of how you have the same piece of (logical) code for every question already. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 6:29 pm Post subject: RE:Help With Millionaire Like Game |
|
|
but can you help me write that code because im having problems writing the code for the fifty-fifty, ask the audience and the take the money home feature because we can not use procedure functions can you help me write the code for those features thanks |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Jan 13, 2011 6:36 pm Post subject: RE:Help With Millionaire Like Game |
|
|
What kind of problems are you having with writing that code? |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 9:37 pm Post subject: RE:Help With Millionaire Like Game |
|
|
i dont know i dont know how to write a code like that can you do that for me tony if you can thanks |
|
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 9:39 pm Post subject: RE:Help With Millionaire Like Game |
|
|
can you change my code so those thing can occur without the use of the procedure function |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Jan 13, 2011 9:44 pm Post subject: Re: RE:Help With Millionaire Like Game |
|
|
powerful08 @ Thu Jan 13, 2011 9:39 pm wrote: can you change my code so those thing can occur without the use of the procedure function
Is your teacher cool with giving me the marks for those parts? I could use some bonus marks... |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 9:57 pm Post subject: RE:Help With Millionaire Like Game |
|
|
so ur not going to help me |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 10:01 pm Post subject: RE:Help With Millionaire Like Game |
|
|
yes my teacher is cool with u getting the marks ![Smile Smile](http://compsci.ca/v3/images/smiles/icon_smile.gif) |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Jan 13, 2011 10:12 pm Post subject: Re: Help With Millionaire Like Game |
|
|
ಠ_ಠ
Come on, "i dont know how to write a code like that" is a terrible excuse. If you knew how to do everything already, there wouldn't be a point in going to classes and doing assignments. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 10:31 pm Post subject: RE:Help With Millionaire Like Game |
|
|
can you give me a tip or something |
|
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 10:33 pm Post subject: RE:Help With Millionaire Like Game |
|
|
and i have tried its just that i cant get it right |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Jan 13, 2011 10:38 pm Post subject: RE:Help With Millionaire Like Game |
|
|
code: |
put "Please Input The Number Of Your Choice"
get answer1
|
Well your first step would be to figure out if the input is an attempt at an answer or the player is using one of the lifelines. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
powerful08
|
Posted: Thu Jan 13, 2011 10:40 pm Post subject: RE:Help With Millionaire Like Game |
|
|
so i check if its either a life line or a answer by putting in if answer1= 50-50 then |
|
|
|
|
![](images/spacer.gif) |
|