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
Name and describe the two (2) broad categories of files
fenix001 [56]
If it’s computer files, that would be System Software and Application software.

“The System Software is the programs that allow the computer to function and access the functionality of the hardware. Systems software sole function is the control of the operation of the computer.

Applications software is the term used for programs that enable the user to achieve specific tasks such as create a document, use a database or produce a spreadsheet.”
8 0
3 years ago
What form of note taking would be MOST beneficial for a visual learner who needs to see the connections between ideas?
Svetlanka [38]

Answer:

Think link

Explanation:

8 0
3 years ago
Find the titles of courses in the Computer Science department that have 3 credits. Find the IDs of all students who were taught
Kay [80]

Answer:

Explanation:

To solve this we break down the question and write the programme in steps as shown in the attachment

Download docx
4 0
3 years ago
Write a SELECT statement that returns these three columns: vendor_nameThe vendor_name column from the Vendors table default_acco
Sati [7]

Explanation:

"Select vendor_name as Vendor_Name,

default_account_number as Default_Account_No ,

account_description as Account_Description

From Vendors v, General_Ledger_Accounts ledger

where (add the join condition here)

Order by account_description, vendor_name"

Note: In the above statement, include the alias name appropriately and then execute the query

The "select statement" should contain the list of columns to be displayed

"From statement" should contain the name of the table from which data needs to be fetched.

"Where clause" defines the relationship as well the condition that needs to be executed

"Order by clause" defines the sorting mechanism with the relevant field

5 0
3 years ago
Rickie gets a message from the school’s tech support department. Their computer is supposed to be running the latest system soft
raketka [301]

Answer:

the operating system or web browser

6 0
3 years ago
Read 2 more answers
Other questions:
  • Question 4 (2 points)
    6·2 answers
  • Write a function wordcount() that takes the name of a text file as input and prints the number of occurrences of every word in t
    12·1 answer
  • Data mining must usestatistics to analyze data.<br> True<br> False
    12·1 answer
  • I need someone to help. This is the links I found and I'm going through the same thing. I live in small town where they think I'
    14·1 answer
  • PLZ ANSWER THESE QUESTIONS FOR 30 POINTS AND BRAINLIEST!
    9·1 answer
  • List at least 5 professions for people working in the Information/Communication<br> fields.
    10·1 answer
  • How do I indent the 1. bullet so it is not lined up with the regular bullet above it?
    9·1 answer
  • What is multimedia computer system​
    7·1 answer
  • 30 Points!!
    13·2 answers
  • Consider the following code using the posix pthreads api:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!