944,066 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 1071
  • Python RSS
Jul 5th, 2007
0

Looking for some Guidance.

Expand Post »
Taking on a pet project to teach myself some things and hone some amateur skills.

Wondering if you could help point me in the right direction and assist me with some technical points as i get stuck.

I have a basic idea of how i would do this,... but i'm not sure whether it is the best way. So ... hence my guidance seeking.

Stage 1 will be a small prototype program,... once i can get it all workin in small form, i will then expand it greatly to an end state that i'm looking for.

Once the program executes. The user will be asked to choose between 3 things.. listed as option ABC or 123. Once they choose,... a random code, ... will give them a result based on their choice. Then they will be given 3 more choices. Random code again.

Just 2 questions asked overall... ending with a summary based on what happened based on their responces.

eg.1st Phase choose A, B or C

If you choose A,... random result of DEF can happen
If you choose B,... random result of GHI can happen
If you choose C,... random result of JKL can happen

2nd Phase You are given another choice based on the random result above.

Person chose C, their random result was L

From L, they are given 3 things to choose from.

If they choose A... random result of MNO can happen
If they choose B... random result of PQR can happen
If they choose C... random result of STU can happen

... summary given...

You choose to do 'x'.... as a result the first random result,.. this led you into situation b.. and you chose 'y'... as a result ... this is what happened.

So there will be alot of stored data as potential outcomes stored.

From choice 1,... 9 possible outcomes.
After Choice 2... could see upto 81 different outcomes 9x9

So over all there would be 90 total outcomes listed in a table. To be randomly drawn form.

..., ... How would you begin coding this..., let me know the best way for me to nut this out. I hope it will teach me alot as a i go.

Once i have this small prototype built.. i plan to expand it.

Project 2 i want to have 'weighted randoms' if possible.. making some out comes more likely then others. Having more choses, more phases.


Any assistence would be greatly appreciated.


Tony Noyeaux
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Noyeaux is offline Offline
2 posts
since Jul 2007
Jul 6th, 2007
0

Re: Looking for some Guidance.

Looks like you want to implement the choices as a tree. http://www.ibiblio.org/obp/thinkCSpy/index.html has a good example in appendix D and is a great tutorial in general.

HTH
Reputation Points: 20
Solved Threads: 3
Newbie Poster
N317V is offline Offline
23 posts
since Jul 2006
Jul 6th, 2007
0

Re: Looking for some Guidance.

What part in appendix d do you feel is most apt. A few of those things maybe could work.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Noyeaux is offline Offline
2 posts
since Jul 2007
Jul 6th, 2007
0

Re: Looking for some Guidance.

Well I was referring to the tree example, but your explanation of the problem reminded me of the "guess the animal" game (also in appendix d).
Reputation Points: 20
Solved Threads: 3
Newbie Poster
N317V is offline Offline
23 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: I just started Python...
Next Thread in Python Forum Timeline: Help with: Unqualified exec error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC