ollowing steps need to be performed:
Initialize a variable called number with a value of 10 and a variable called numAttempts with a value of 0
Ask the user for their name
Ask the user to guess a number between 1 and 20 and store that in a variable guess, increment the numAttempts variable
If guess is same as number then say your guess is correct and you guessed it in n attempt(s), where n is the value of numAttempts variable and your program ends.
If guess is lower than number then print "Your guess is too low". If numAttempts variable < 3, the goto step #7 else goto step #8.
If guess is higher than number then print "Your guess is too high". If numAttempts variable < 3, the goto step #7 else goto step #8
Repeat step #3 - #6.
If the user does not guess the number even after three attempts then print “Your three guesses are over, the number I was thinking of was 10”
Sample 1
Hello! What is your name?
Albert
Well, Albert, I am thinking of a number between 1 and 20.
Take a guess.
15
Your guess is too high.
Take a guess.
4
Your guess is too low.
Take a guess.
12
Your guess is too high. Your three guesses are over. The number I was thinking of was 10
Sample 2
Hello! What is your name?
Albert
Well, Albert, I am thinking of a number between 1 and 20.
Take a guess.
8
Your guess is too low.
Take a guess.
12
Your guess is too high.
Take a guess.
10
Good job, Albert! You guessed my number in 3 guesses!
Optional: Instead of fixing the number to be guessed to 10, you can initialize 'number' variable with a random number between 1 and 20 that you generate using the functions in the random module. This way every time you re run the program, it is a different number to be guessed.
____________________________________________________________________________________________________
Part - II (5 points)
Rock, Paper, Scissor:
Write a program to simulate the paper-rock-scissor game. Each of the two players type in P, R, or S. The program then announces the winner based on the rule: Paper covers Rock, Rock breaks Scissors, Scissors cut Paper, or Nobody wins. Be sure to allow the players to use lowercase as well as uppercase letters.
You MUST implement a function that takes the choices that both the players made and returns 1 if the player 1 won and 2 if the player 2 won and 0 if it is a tie. So the logic of deciding who won based on the rock, paper, scissor rule must be programmed inside this function.
You MUST call this function to decide who won and you must display the result of the game based on the return value of the function.
Sample run:
Player 1: Please enter either (R)ock, (P)aper, or (S)cissors: P
Player 2: Please enter either (R)ock, (P)aper, or (S)cissors: s
Player 2 wins.
Optional: Your program can allow the users to play repeatedly say 5 times. Your program should then keep a score for each player and display that after each play.
Sample run (with optional part):
Player 1: Please enter either (R)ock, (P)aper, or (S)cissors: P
Player 2: Please enter either (R)ock, (P)aper, or (S)cissors: s
Player 2 wins.
Scores after this play:
Player 1: 0
Player 2: 1
Hi, I am a Python expert with 4 years of experience. And an MSc student working with Python. So I would like to do this well discripted easy job for you, if you would consider working with me. Bilal.
Dear Client,
Greeting of the day ahead !!! Thanks for providing us opportunity to place bid over the project and communicate with you. I am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned .I have checked your requirements.i have right skills to work on this assignment
Here we would like to bring in your notice that
We are a team of professionals including experienced analysts, designers, project managers, developers and QA people having great expertise in web applications development mainly on core PHP, PHP with open sources (Joomla, Wordpress, Codeigniter, Cake PHP), .NET, Asp.NET, Vb.NET, HTML 5 etc. and mobile applications on ios and Android platform.
We find our expertise, skills and capabilities are perfectly blends with your project requirements because we have already worked on many projects. For Quality Purpose we use : Testing of project in different stages” like module testing, integration testing and system testing. So there will be less probability of any error or issue".can u provide your email or sky-pe etc for further discussion about the project. plz add me to discus
I am ready to discuss with you Looking forward to hear from you.
with best Regards
This task seems very easy and can do it in 1 or 2 hours. I am an expert in Python coding and have been coding in python for last 7 years. Once the task is given, I'll solve it in no time. Employer can message me for any further details.
Hello,
I am a very experienced and passionate python developer. I have over 5 years experience. The challenge at hand is very simple and can be completed in an hour from hiring.
I would like to assure you that the project will be done to completion with a high degree of perfection.
I look forwarded to working with you.