Find Jobs
Hire Freelancers

project python Rock Paper Scissors game

$10-30 USD

완료함
게시됨 약 5년 전

$10-30 USD

제출할때 지불됩니다
The starter code gives you a place to begin, with Player and Game classes that are mostly empty. Over the course of the project, you will be greatly expanding the classes and methods in this program. Read the starter code, and run it on your computer to see what it does. Try importing it into the Python interpreter and experimenting with the Player and Game objects. 2. Create a player subclass that plays randomly The starter Player class always plays 'rock'. That's not a very good strategy! Create a subclass called RandomPlayer that chooses its move at random. When you call the move method on a RandomPlayer object, it should return one of 'rock', 'paper', or 'scissors' at random. Change the code so it plays a game between two RandomPlayer objects. 3. Keep score The starter Game class does not keep score. It doesn't even notice which player won each round. Update the Game class so that it displays the outcome of each round, and keeps score for both players. You can use the provided beats function, which tells whether one move beats another one. Make sure to handle ties — when both players make the same move! 4. Create a subclass for a human player. The game is a lot more interesting if you can actually play it, instead of just watching the computer play against itself. Create a HumanPlayer subclass, whose move method asks the human user what move to make. (Take another look back at the project demo to see what this can look like!) Set the program to play a game between HumanPlayer and RandomPlayer. 5. Create player classes that remember At the end of each game round, the Game class calls the learn method on each player object, to tell that player what the other player's move was. This means you can have computer players that change their moves depending on what has happened earlier in the game. To do this, you will need to implement learn methods that save information into instance variables. Create a ReflectPlayer class that remembers what move the opponent played last round, and plays that move this round. (In other words, if you play 'paper' on the first round, a ReflectPlayer will play 'paper' on the second round.) Create a CyclePlayer class that remembers what move it played last round, and cycles through the different moves. (If it played 'rock' this round, it should play 'paper' in the next round.) (Something to think about: What should these classes do on the first move?) Test each of these player classes versus HumanPlayer. 6. Validate user input The human player might sometimes make typos. If they enter roxk instead of rock, the HumanPlayer code should let them try again. (See how this works in the demo if you type something in that isn't a valid move.) 7. Announce the winner It's up to you how long the game should run. The starter code always plays three rounds, but that's not the only way it could work. You could choose to continue until the player types quit, or you could have the game run until one player is ahead by three points, or any other rule that makes sense to you. At the end of the game, have it print out which player won, and what the final scores are. 8. Check your code formatting Use the pycodestyle tool to check the formatting of your code. Make the edits that it recommends, then re-run it to see fewer and fewer warnings. By the time you're done, it should display no warnings or errors at all.
프로젝트 ID: 18518895

프로젝트 정보

12 제안서
원격근무 프로젝트
활동 중 5년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
hi i would love to do your task. i 'll do unlimited revisions till satisfactorily completion of your [login to view URL] for your response...i will provide in 15 mins
$25 USD 1일에
4.8 (14 건의 리뷰)
4.0
4.0
12 이 프로젝트에 프리랜서들의 평균 입찰은 $42 USD입니다.
사용자 아바타
Hi there, I do Python programming and I have strong foundation in algorithms and data structures. I went through your requirements and I would like to do the Rock Paper Scissors game project. I know how to work with classes and object oriented principles. Let me know if you are interested.
$30 USD 1일에
4.9 (36 건의 리뷰)
4.7
4.7
사용자 아바타
Hi There I've excellent programming and development skills and knowledge. I can provide an efficient, perfect, well documented development of your Programming and Computer project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif
$30 USD 1일에
4.9 (20 건의 리뷰)
4.3
4.3
사용자 아바타
Looks like a basic university project where you have to demonstrate that you can code. I can have it ready for you within 16 hours
$30 USD 1일에
5.0 (5 건의 리뷰)
4.0
4.0
사용자 아바타
I have 5+ years of python experience. I have read the description and checked the initial code attached. I have developed a similar game project (for backgammon) very soon. In that project I had human players, random playing players and ai players. Hope we can work together. I can start immediately and finish the job quick.
$25 USD 1일에
4.9 (11 건의 리뷰)
3.5
3.5
사용자 아바타
HI! Not that complicated but funny project. Will be glad to make it for you. Let's discuss in chat, if you are interesting.
$30 USD 3일에
5.0 (4 건의 리뷰)
2.6
2.6
사용자 아바타
Hello, I am an Msc computer science student and a Java/Python expert with 5 years experience. I have read your project description and I can help you with your task following every detail and requirement. I have an history of delivering satisfactory and excellent job to my clients within a limited timeline. let's discuss more about your project in chat. thanks
$40 USD 1일에
4.9 (2 건의 리뷰)
1.9
1.9
사용자 아바타
Hello! As you can see from my profile, I'm a pro competitive programmer, extremely experienced with Python programming (more than 5 years now). I'll be glad to help you. My guarantees: - clean and efficient code - extremely fast delivery (I expect the whole job to take me no more than 2 hours) Hope to hear from you soon if you'd like to discuss. Best wishes, Vlad
$111 USD 0일에
5.0 (1 건의 리뷰)
1.2
1.2
사용자 아바타
Hello! I hope you can award me the bid! ------------------- 5. Create player classes that remember At the end of each game round, the Game class calls the learn method on each player object, to tell that player what the other player's move was. This means you can have computer players that change their moves depending on what has happened earlier in the game. To do this, you will need to implement learn methods that save information into instance variables. Create a ReflectPlayer class that remembers what move the opponent played last round, and plays that move this round. (In other words, if you play 'paper' on the first round, a ReflectPlayer will play 'paper' on the second round.) Create a CyclePlayer class that remembers what move it played last round, and cycles through the different moves. (If it played 'rock' this round, it should play 'paper' in the next round.) (Something to think about: What should these classes do on the first move?) --------------------------- This looks like fun and we can implement new things that you want!
$25 USD 3일에
0.0 (0 건의 리뷰)
0.0
0.0
사용자 아바타
Dear sir, madam I am interesting your project. I can satisfy you perfectly. I have read your description and I would like to work for you having perfect expertise in required task. I am software engineer having 5 years’ experience expert in java, C, C++, C#, python, Android, MATLAB Regards Waqar Amjad
$105 USD 1일에
0.0 (2 건의 리뷰)
1.1
1.1
사용자 아바타
Hello, Thank you for giving such a thorough description of your project, this is really helpful. I would be very interested to work on your project. As an electrical engineer specializing in computer science I have been working with Python for many years. This a simple application but fun to work on. I also have experience in machine learning so it shouldn't be too much of a challenge to build a learn method. I have a great attention to details and can garantie that I will deliver a neat user interface that matches your requirements. I would love to talk more about the details of your project. Looking forward to hear from you, Elodie Couturier
$35 USD 3일에
0.0 (0 건의 리뷰)
0.0
0.0

고객에 대한 정보

국기 (SAUDI ARABIA)
Riyadh, Saudi Arabia
5.0
1
결제 수단 확인
1월 13, 2019부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.