Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Python Dictionary, List Operations, and Programming Exercises

Question #1

Question #1

Create a Python dictionary that stores the following key/value pairs:1/I, 5/V, 10/X, 50/L, 100/C, 500/D, 1000/M, 10000/Y, 50000/E, 100000/Zand then write Python code that loops through the dictionary and displays only values that are powers of 10 (i.e. 1, 10, 100, 1000, etc).
Question #2

Given the following code, write the ouput:

S = [['him', 'sell'], [90, 28, 43]]
print(S[0][1][1])

Question #3
Explain what the following Python code does and what value(s) are stored in m1?

a = [1, 2, 3, 4]
b = [17, 12, 11, 10]
c = [-1, -4, 5, 9]
f1 = lambda x, y, z : x + y - z
m1 = map(f1, a, b, c)


Question #4
Given the following Python code (below), explain what the code does andwhat it displays?

numsList = [1, 99, -7, 18, 63, -2]
print(mixedList[1:-2])
PART B: PROGRAMMING
In a plain text file named partB.txt, provide solutions to the followingquestions using the Python programming language.

Question #5

Write a Python program, that will print all numbers between 4000 and 6868(inclusive) Where ALL digits of the number are even numbers (0 is considered even).Examples of such numbers would be: 4268, 4486, 4088, 6248, 6000, 6202, etc.NOTE: EACH and EVERY digit MUST be an EVEN number!



Question #6

Write the code for a Python function named "removeAndCreateUpperList" thatremoves the Nth occurrence of a given word in a list and returns the a newlist such that all remaining words are converted to UPPERcase.

For example, given a list:

words = [ "she", "sells", "sea", "shells", "by", "the", "sea!" ]

Then the function call newList = removeAndCreateUpperList(words, 3) would
remove "sells" from the list and return the new list:

[ "SHE", "SELLS", "SHELLS", "BY", "THE", "SEA!" ]



Question #7
A deck of cards contains 52 different cards separated into 4 suits:'C', 'D', 'H', 'S' ('C'lubs, 'D'iamonds, 'H'earts and 'S'pades)

with each suit containing one of each of the following 13 faces:'2', '3', '4', '5', '6', '7', '8', '9', 'X', 'J', 'Q', 'K', 'A'

All 52 cards therefore are represented by the following strings:
"2C", "3C", "4C", "5C", "6C", "7C", "8C", "9C", "XC", "JC", "QC", "KC","AC"
"2D", "3D", "4D", "5D", "6D", "7D", "8D", "9D", "XD", "JD", "QD", "KD", "AD"
"2H", "3H", "4H", "5H", "6H", "7H", "8H", "9H", "XH", "JH", "QH", "KH", "AH"
"2S", "3S", "4S", "5S", "6S", "7S", "8S", "9S", "XS", "JS", "QS", "KS", "AS"

Poker hands are made up of 5 unique cards chosen randomly from a deck of
52 cards.

Write a Python function called "pokerHands" that accepts an integer (N)and then randomly displays N poker hands (where each poker hand is comprised of 5 different cards and all cards in all hands displayed are unique).

No more than 10 hands can be displayed, so if N is > 10, then an error messageis displayed and the functions ends.

Your solution MUST use a Python dictionary to store all 52 cards a

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close