How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask active1065 Your Own Question

active1065
active1065, Engineer
Category: Homework
Satisfied Customers: 244
Experience:  Several years of experience in C# ,ASP.NET,PHP,C,C ++,SQL
Type Your Homework Question Here...
active1065 is online now
A new question is answered every 9 seconds

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,

Welcome to Justanswer.

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


Please share the download link.
Customer: replied 5 months ago.

i have just uploaded to wikisend.com its a pdf

Expert:  active1065 replied 5 months ago.
Can you give me the wikisend link please.
Customer: replied 5 months ago.

http://wikisend.com/download/716610/u08008-cw2-2013 (3).pdf

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,

Your code is complete.

Please find it in this link: http://wikisend.com/download/356592/diegame.py

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
active1065 and 10 other Homework Specialists are ready to help you
Customer: replied 5 months ago.

when new score is greater than score its giving this error.please help me if you could.


 


 


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.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
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.

JustAnswer in the News:

 
 
 
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.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...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
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4514
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4514
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3099
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2453
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2258
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    2193
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1962
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1865
    Bachelors Degree and CPA with Accounting work experience