Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using Python answer 8.18 A-F Exercise Re. 9 im adsconar have two keys with the s

ID: 3694223 • Letter: U

Question


Using Python answer 8.18 A-F Exercise Re. 9 im adsconar have two keys with the same vall a11 Cana dictionary have w 12 Define a dictionary that ionary that maps month name abbreviations to mo e a dictionary with five entries that maps student identificat s to mon ne a dict hoir full names .xs.ia Define a dictionary that maps the course numbers of the cours tbo R813 Detine a dictio heir full names urses .xs.N taking to their corresponding course titles. ·R8.15 Define a dictionary that maps the ISBN number of your tex R8.16 Write a function that takes a s tion that takes a string argument and returns he most common letter in the string. a. t b. a set consisting of the lowercase letters not contained in th c. a dictionary containing the number of times each letter o ining the number of times each letter o a. a set consisting of the upper- and lowercase letters that a b. a set consisting of the upper- and lowercase letters that a c. a set consisting of all non-letter characters contained in R8.17 Write a function that takes two string arguments and returns strings either string. ·R8.18 Given a dictionary gradeCounts- "A": 8, "D": 3, "B": 15, "F" 2, "C" 6 write the Python statement (s) to print: a. all the keys b. all the values. c. all the key and value pairs.

Explanation / Answer

a.
gradeCounts = { "A" : 8, "D" : 3, "B" : 15, "F" : 2, "C" : 6 }
print(" All keys:")
for key, value in gradeCounts.items() :
print (key)

b.

gradeCounts = { "A" : 8, "D" : 3, "B" : 15, "F" : 2, "C" : 6 }
print(" All values:")
for key, value in gradeCounts.items() :
print (value)

c.

gradeCounts = { "A" : 8, "D" : 3, "B" : 15, "F" : 2, "C" : 6 }
print(" All keys and values:")
for key, value in gradeCounts.items() :
print (key, value)

d.
print(" All keys and values in key order:")
for key in sorted(gradeCounts):
print ("%s: %s" % (key, gradeCounts[key]))

e.

gradeCounts = { "A" : 8, "D" : 3, "B" : 15, "F" : 2, "C" : 6 }
i=1
for key, value in gradeCounts.items() :
sum = sum + int(gradeCounts[key])
i = i+1
print (" Avarage:", sum/i)

f.

gradeCounts = { "A" : 8, "D" : 3, "B" : 15, "F" : 2, "C" : 6 }

for key in sorted(gradeCounts):
count = int(gradeCounts[key])

print(key,": ",)
while count >0:
print("*")
count = count - 1
print(" ")
  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote