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
Edhesive 7.2 code practice Write a function named ilovepython that prints out I love Python three times. Then, call that functio
Marysya12 [62]

Answer:

def i_love_python():

   for _ in range(3):

       print("I love Python")

i_love_python()

Explanation:

3 0
2 years ago
100 POINTS + BRAINLYEST FOR FIRST PERSON THAT GETS IT RIGHT!!!! While writing a formula, what are some ways to insert a cell ref
nexus9112 [7]

Answer:

Line second and third i.e, "typing the cell name, like "B4"  and clicking the cell to reference " the correct answer.

Explanation:

It relates to some kind of set of cells on the worksheet, which could be used to calculates the formula. It also helps to locate the information, which you want to analyze in the calculation. It can also provide the cell reference in  more than one formula in the same worksheet, that relates to Information on many other workbooks, and wrong choices can be described as follows:

  • Hovering provides the basic details, in which we hover, that's why it is wrong .
  • Zooming is used in projection, it can't be used in the cell reference, that's why it is wrong.
7 0
3 years ago
Read 2 more answers
You are trying to sell a new product to a store owner. Which method of presentation is likely the most effective?
Elina [12.6K]
D. Because if you show the owner the graph he'Il be impressed so he'll obviously want proof so show him the other store owners success quotes and then for him to trust you, Give him a trial of the product
5 0
3 years ago
Read 2 more answers
How many unique combinations from 12 bit?
svet-max [94.6K]
This is calculated by raising 2 to the power of the number of bits.

2^12 = 4096
3 0
3 years ago
61. Select an activity of the Production Phase: a. a web authoring tool is often used b. the graphics, web pages, and other comp
Elodia [21]

Answer:

d. all of the above.

Explanation:

Since the advent of digital technology, production of goods and services have experienced a significant change from the traditional methods of production. This paradigm shift is made possible by the application of various modern technology.

Production processes are generally being facilitated and enhanced by the use of;

1. Computer-integrated manufacturing (CIM).

2. Computer-aided process planning (CAPP).

3. Computer-aided design (CAD).

4. Computer numerical control (CNC).

In the process of selecting an activity of the production phase:

1. A web authoring tool is often used.

2. The graphics, web pages, and other components are created.

3. The web pages are individually tested.

7 0
3 years ago
Other questions:
  • Question 1 (True/False Worth 15 points)
    6·1 answer
  • True or false webcasts are delivered only as prerecorded audio and video content
    5·1 answer
  • When planning your educational and career path, it makes sense to consider where you want to work and what type of work you want
    14·1 answer
  • Fourlotts Corp. provide integrated services that include storing manufactured goods, packaging, and delivering it to the dealers
    13·1 answer
  • Pda bkhhksejc pnwjoynelp dwo xaaj ajykzaz ywj ukq zaykza ep???<br><br><br> The Key Value is 22
    12·1 answer
  • You are helping a friend in college with his network connection. He would like a high speed connection between his computers so
    9·1 answer
  • If you can photoshop please text me i need help for my digital media class 7862381441
    9·1 answer
  • I Previous
    6·1 answer
  • When preparing a technical document, do all of the following EXCEPT:_______.
    12·1 answer
  • Write a program that allows a user to choose to roll between 1 and 100 dice between 1 and 1000 times
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!