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
BaLLatris [955]
2 years ago
8

Write a program that simulates picking a card from a deck of 52 cards. Your program should display the rank (Ace, 2, 3, 4, 5, 6,

7, 8, 9, 10, Jack, Queen, King) and suit (Clubs, Diamonds, Hearts, Spades) of the card using python
Computers and Technology
1 answer:
Artyom0805 [142]2 years ago
7 0

Answer:

Explanation:

The following is a python function that has arrays with all the cards available and then uses random to choose a random card from the dictionary. Finally it prints out the card chosen...

import random

def choose_card():

   card = ["Ace", 2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jack', 'Queen', 'King']

   symbols = ['Clubs', 'Diamonds', 'Hearts', 'Spades']

   chosen_card = str(card[random.randint(0, len(card))])

   symbols = symbols[random.randint(0, len(symbols))]

   print("Chosen Card: " + chosen_card + " of " + symbols)

You might be interested in
Which approach is ideal for ensuring that a Webpage is maintained and does not appear neglected to users?
Greeley [361]

Answer:

D

Explanation:

I think putting hyperlink in essential pages is a good idea as it may guide a user

8 0
3 years ago
Josie, your best friend, is having a huge Sweet Sixteen party. She has designated you to address all 100 of the envelopes (using
marysya [2.9K]

You add all the addresses into excel and and do mail-merge with the invitation. Adding the 100 addresses is probably a lengthy process but once this is complete you can just add on addresses and once a year or whenever you have to mail something to everyone, it's  a only mouse-click.

4 0
3 years ago
What can you do if brainstorming only gives you a small or incomplete idea?
Grace [21]

Answer:

D. All of the above

Explanation:

5 0
3 years ago
You are the network administrator for a small organization of 100 users. Users till now were freely browsing the Internet. You w
Schach [20]

Answer: Proxy server

Explanation: Proxy server is a type of server that is acts as interface between the network on huge scale and any local network. This server provides the feature of security, operations, privacy etc in the network system. They also help in improving the performance of the network.

It can work as the web filter to eliminate the unwanted websites.They acts as the gateway by  observing the website that is being browsed by the other user.Thus installation of proxy server should implemented on the organization.

8 0
3 years ago
What imaging test can tell the speed and direction of blood
Sindrei [870]
A doppler ultrasound
8 0
3 years ago
Other questions:
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • Which section of a personal narrative requires the most development
    9·1 answer
  • Blank are back and forth movement of matter that create sound​
    15·1 answer
  • A storyboard is an example of an implementation tool.
    8·1 answer
  • Which of the following statements is true?A)Implicit data type conversion is performed when you mix values of different data typ
    5·1 answer
  • Write a program to check the password( qbasic)​
    8·1 answer
  • ) Perform error checking for the data point entries. If any of the following errors occurs, output the appropriate error message
    11·1 answer
  • How does computer number system play a Vital role in a computer calculation. ​
    8·1 answer
  • Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the elemen
    14·1 answer
  • In which of the following situations would it be most appropriate to choose lossy compression over lossless compression?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!