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]
3 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]3 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
1. What is an advantage of the PCIe bus over the PCI bus?
m_a_m_a [10]

Answer:

Explanation:

1. PCI Express (PCIe) is a next generation I/O bus architecture. Rather than a shared bus, each PCIe slot links to a switch which prioritizes and routes data through a point-to-point dedicated connection and provides a serial full-duplex method of transmission.

2. Mini-ITX or Laptops

3.PCMCIA Personal Computer Memory Card International Association

4. PCIe x1 slot

8 0
4 years ago
In terms of their eligibility for legal protection, how do ideas differ from song lyrics?
4vir4ik [10]

Answer:

D

Explanation:

3 0
3 years ago
Read 2 more answers
Briefly describe the software quality dilemma in your own words
Dahasolnce [82]

Answer:

 software quality dilemma is a situation where there is confusion regarding what should we prioritize : a good quality work or a fast paced work. In software development , many a times there will be deadlines to achieve, in such cases software quality dilemma is bound to occur. A developer would have to choose between writing and optimized and well commented code or just get the job done without proper optimized or reviews. In same lines, many companies have to decide between regular reviews and expert opinions of a product for good software quality or bypass them to meet budgets and deadlines.

6 0
4 years ago
Given the following class definition and the variable declaration:
Lorico [155]

Answer:

The answer is "Option d".

Explanation:

In the above-given code, two-class is defined that is "employee and manager", in which the first class "employee" defines two variables that are "name, id". In this name is pointer type character and id is a long type variable.

In the second class "manager" one variable "rank" and the employee object is created. In this class, the rank variable is a pointer type character, and outside this class, a reference "x" is created.

In this code, we use both class object that uses the "employee" class variable that is id to hold value in it.

7 0
3 years ago
You are the project manager tasked to implement a critical application in a reputed bank. A client review indicates that you cou
Oksana_A [137]
Hiring based on unbais form
6 0
3 years ago
Other questions:
  • What is the main function of the motherboard?
    12·1 answer
  • Sammy created a new logo for his client enlarged to use on a billboard ad. Now Sammy needs to redo the logo. What should he do t
    5·1 answer
  • What is a thesaurus is best used for​
    11·2 answers
  • A disk drive’s data ____________________ rate is a summary performance number combining the physical aspects of data access with
    10·2 answers
  • Which of the following information would best be displayed throughout the use of a time line
    11·1 answer
  • Which features of words are used to separate numbers and texts into columns
    11·1 answer
  • Public-key encryption schemes are secure only if the authenticity of the ___________ is assured.
    12·1 answer
  • Why is network security important? Check all of the boxes that apply. A. Network security allows organizations to continue to fu
    8·1 answer
  • Which of the following best describes the existence of undecidable problems? *
    6·1 answer
  • Someone please help me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!