1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
____ [38]
3 years ago
11

Write a function called play_round that simulates two people drawing cards and comparing their values. High card wins. In the ca

se of a tie, draw more cards. Repeat until someone wins the round. The function has two parameters: the name of player 1 and the name of player 2. It returns a string with format ' wins!'. For instance, if the winning player is named Rocket, return 'Rocket wins!'.
Computers and Technology
1 answer:
elena-s [515]3 years ago
8 0

Answer:

Here you go, Change it however you'd like :)

Explanation:

import random as r

def play_round(p1, p2):

   cards = [1,2,3,4,5,6,7,8,9,10,"J","Q","K","A"]

   play1 = r.choice(cards)

   play2 = r.choice(cards)

   

   while play1 == play2:

       play1 = r.choice(cards)

       play2 = r.choice(cards)

   

   if cards.index(play1) > cards.index(play2):

       return f"{p1}'s Card: {play1}\n{p2}'s Card: {play2}\nThe Winner is {p1}"

   else:

       return f"{p1}'s Card: {play1}\n{p2}'s Card: {play2}\nThe Winner is {p2}"

print(play_round("Bob","Joe"))

You might be interested in
Gauthmath https://s.tutorus.xyz/lp/invite?code=GGQGBL​
sammy [17]

Answer:

Umm

Explanation:

3 0
2 years ago
Why is stranded rather than solid cable used for patch cables? Why is it critical not to score the jacket too deeply when stripp
Serggg [28]

Answer:

The definition of the issues is listed throughout the section down.

Explanation:

  1. Stranded cables are somewhat more compact and can be mounted quickly. Strong cables become rigid in design, and they are not versatile for installation. In comparison with solid connectors, amplification is indeed high.
  2. Unless the innermost layer including its wire is broken as we attempt to connect the cable, it will not function. So, whenever stripping the cables through the walls, it's indeed important not to rank the jack too profoundly.
  3. It would be quick to untwist the cable and then will ensure that perhaps the connection is appropriate for the most widely encountered rj-45 connection whenever the wiring of 0.5 inches becomes coupled up.
  4. If we don't keep the right pin colors in order, the relation won't work. Afterward, when another connexon is broken due to many complications, it would be impossible to figure out the contacts unless the pins coloring are not always in sequence.
  5. The connection pairs can be cut off through 0.5 inches within about therefore the gap within the connector is narrower and the wire would not be correctly attached if we break the cable further. The link is lost and the cable does not run properly.
  6. It is necessary to ensure that perhaps the wires are forced to the end of the platform since the connexon will indeed be broken as well as the connector would not operate unless the wires aren't moved. The wires will fall out of another socket as well.
  7. Before even being incorporated into another crimping unit, it is good to carefully check the connection sequence to ensure that perhaps the wires are to the end since it is impossible to verify the sequence until the wires are attached to something like the connector. Unless the connections are not always in alignment, the link will also not be provided and indeed the wire would not operate correctly, even if the link is provided. Such wires can also be presented to use load barriers, and that it's the simplest operation.
  8. The Durability Tester has been used to determine the hardness between two stages, whereas the connection efficiency is tested using the qualification tester.

8 0
3 years ago
PLEASE HELP ASAP I WILL GIVE BRAINLIEST TO CORRECT ANSWER
salantis [7]
The correct answer is letter b
8 0
3 years ago
Read 2 more answers
How can having more than one goal cause truble in the work place
siniylev [52]

Answer:

"Having more than one goal can cause problems at work as it makes it difficult to focus on just one thing and thus can lead to poor results. This is because by having multiple goals there is less concentration, less focus and therefore less ability to accomplish various goals at work with more efficiency and quality."

6 0
2 years ago
Make a list of any four computer that were used in the history of computer.​
blondinia [14]

Answer:

ENIAC, UNIVAC, EDVAC and IMB 1401 are the list of computers used in history of computer

Explanation:

hope it helps

plz make it brainliest ans

7 0
3 years ago
Other questions:
  • 7. Write a program in C to display the string "ARRAY" in the following format : A AR ARR ARRA ARRAY
    5·1 answer
  • Your sister is considering purchasing a tablet computer that utilizes RT as the
    11·1 answer
  • In cell F15, insert a function that will automatically display the word Discontinue if the value in cell D15 is less than 1500,
    6·1 answer
  • Write a program to calculate the area of a triangle whose base is 10cm and height is 6cm
    6·1 answer
  • An image that has been saved in Tagged Image File Format (or .TIF) is A. readable only by Windows personal computers. B. a recto
    6·1 answer
  • Which of the following bit patterns represents the value -9 in two’s complement notation?
    15·1 answer
  • Write a program get_price.py with a function get_price() that takes a dictionary of fruits as an argument and returns the name o
    6·1 answer
  • E-banking is also called: [1]
    9·1 answer
  • Please answer this question​
    7·1 answer
  • Table Setting in any occasion can add to the beauty and significance of the event. It may
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!