1. Random secret number from 1 to 10 or any larger range if you want.
2. Two players will guess
3. Determine who was closest.
4. Display the results of the round in a neat and organized fashion.
5. Add some kind of style to your print outs so that your display is nice
In python 3+:
import random
secret_number = random.randint(1,10)
guess_one = int(input("Enter player one's guess: "))
guess_two = int(input("Enter player two's guess: "))
if abs(guess_one - secret_number) < abs(guess_two - secret_number):
print(f"The secret number is {secret_number} and player 1 was closest")
elif abs(guess_one - secret_number) > abs(guess_two - secret_number):
print(f"The secret number is {secret_number} and player 2 was closest")
else:
print(f"The secret number is {secret_number} and it was a tie")
I hope this helps!
Explanation:
The <p> and </p> are the HTML tags and “Paragraph Tag” is the HTML element, i.e. the on-page text. This tag formats any text between the opening <p> tag and the closing </p> tag as a standard paragraph or main body
The stack data structure can erase from its beginning or its end in O(1) time.
The O(1) complexity is an illustration of getting operations done in a constant time.
Stack data structure uses the push and pop operations for inserting and deleting items in a linear or constant time.
This implies that, inserting an item into a stack happens in O(1) time, and also; removing an item from the stack, irrespective of the item location (beginning, end, or in between) happens in O(1) time.
Read more about data structure at:
Where all "the following" i can help you but you said which of the folllowing and ther no picture or anything?
a.
videos.
b.
animated graphics.
c.
audio files for podcasts.
d.
screen capture images.
Spell Check
Grammar Check
Change
AutoCorrect is the feature of the word processor that corrects this word. AutoCorrect is a software feature that is usually found in word processors and text editing interfaces. This feature mainly functions by correcting spellings and common typing errors. For example if a user types “the winow is closed, autocorrect will automatically change it to “the window is closed”.