• 100% Satisfaction Guarantee

active1065, Engineer
Category: Homework
Satisfied Customers: 244
Experience:  Several years of experience in C# ,ASP.NET,PHP,C,C ++,SQL
active1065 is online now

# I need to create a game using python, in this game the computer

### Resolved Question:

I need to create a game using python, in this game the computer rolls 5 dice for the user and tells the score using the table below. It then offers the choice to roll any of the dice a second time. After any rerolling, the score is recalculated and the higher of the two scores is the user’s final score.
For the purposes of this coursework a die is six sided and can have values 1 – 6.
Dice rolls can score if they are any of the types shown in the following table. If the dice roll does not match any type in this table, the score is 0. Types are listed in order of preference so if more than one type applied, the one highest up in the table would be the result. For example 2,2,2,4,4 contains the Full House 2,2,2 and 4,4, and the Three of a Kind 2,2,2. A Full House is higher up in the table than a Three of a Kind so 2,2,2,4,4 would be classified as a Full House and score 25.the table looks like this

Type of score Descriptions Example Score
Five of a kind All dice have the same score 1,1,1,1,1 or 5,5,5,5,5 50

Large Straight Five sequential values 1,2,3,4,5 or 2,3,4,5,6 40

Small Straight Four sequential values 1,2,3,4 or 2,3,4,5 or 3,4,5,6 30

Full House Three of one value and
two of another value 1,1,1,5,5 or 2,2,3,3,3 25

Four of a kind Four dice with the same value 3,3,3,3,5 or 4,5,5,5,5 Sum of all
5 dice

Three of a kind Three dice with the same value 2,2,2,5,6 or 1,3,5,5,5 Sum of all
5 dice
Submitted: 5 months ago.
Category: Homework
Expert:  active1065 replied 5 months ago.
Hi,

Can you please upload the complete requirements to a word or pdf file and upload it to wikisend.com

Customer: replied 5 months ago.

i have just uploaded to wikisend.com its a pdf

Expert:  active1065 replied 5 months ago.
Customer: replied 5 months ago.

Expert:  active1065 replied 5 months ago.
Ok. got it.

This is a bigger assignment than i had earlier estimated. Anyway i will complete it and message you when its done.
Customer: replied 5 months ago.

thanks i will be very great full

Expert:  active1065 replied 5 months ago.
Hi,

i compiled using python v2.7

Please run it,test it and let me know in case you face any problem running the program.

It took quite some time to complete this.SO any bonus amount is certainly appreciated.

Regards,

Customer: replied 5 months ago.

hi thanks for the code i'm just having few problems to run it has I am using Python 3.3.2. I will rate you as soon as I resolve the errors,I will give a bonus if I manage to run it definitely.

Regards

Expert:  active1065 replied 5 months ago.
Ok.

TO run it in python 3.3.2 use print(" ") instead of print " "

If you need help let me know
Customer: replied 5 months ago.

I have done that but its still giving me errors,these are the errors

Traceback (most recent call last):
File "F:\Dicegame.py", line 140, in <module>
main()
File "F:\Dicegame.py", line 12, in main
if reroll(dice):
File "F:\Dicegame.py", line 123, in reroll
inp = raw_input("Do you want to re roll. Enter yes (y) or No(n) ")
NameError: global name 'raw_input' is not defined

Expert:  active1065 replied 5 months ago.
Ok. Use input("Do you want to re roll. Enter yes (y) or No(n) ")

Or use this code

http://pastebin.com/drDG1PSs
active1065, Engineer
Category: Homework
Satisfied Customers: 244
Experience: Several years of experience in C# ,ASP.NET,PHP,C,C ++,SQL
Customer: replied 5 months ago.

Traceback (most recent call last):
File "F:\Dicegame.py", line 140, in <module>
main()
File "F:\Dicegame.py", line 18, in main
elif new_score > score:
TypeError: unorderable types: int() > NoneType()

Expert:  active1065 replied 5 months ago.

Ok.

Seems i didn;t debug properly. This is something new introduced in python 3.

Just add return score at the end of giveResult module. That should fix it.

Customer: replied 5 months ago.

i have tried adding return score but still giving the same errors.

Expert:  active1065 replied 5 months ago.
You can view this answer by clicking here to Register or Login and paying \$3.
Customer: replied 4 months ago.

i have already rated you. i get back to you as soon as i have another home work.

Customer: replied 4 months ago.

hi please i need your help again i have just posted another question on here.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
• He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

• ### Manal Elkhoshkhany

#### Satisfied Customers:

4514
More than 5000 online tutoring sessions.
< Last | Next >

### Manal Elkhoshkhany

#### Satisfied Customers:

4514
More than 5000 online tutoring sessions.

### Linda_us

#### Satisfied Customers:

3099
Post Graduate Diploma in Management (MBA)

### Lani S.

#### Satisfied Customers:

2453
Registered Nurse, Internet Researcher, Private Tutor

### Chris M.

#### Satisfied Customers:

2258
Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

### LogicPro

#### Satisfied Customers:

2193
Expert in Java C++ C C# VB Javascript Design SQL HTML

### F. Naz

#### Satisfied Customers:

1962
Experience with chartered accountancy