answer.
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
zavuch27 [327]
2 years ago
15

Write a function summarize_letters that receives a string and returns a list of tuples containing the unique letters and their f

requencies in the string. Test your function and display each letter with its frequency. Your function should ignore case sensitivity (that is, 'a' and 'A' are the same) and ignore spaces and punctuation. When done, write a statement that says whether the string has all the letters of the alphabet.
Computers and Technology
1 answer:
marysya [2.9K]2 years ago
3 0

Answer:

Explanation:

2nd part

def summarize_letters(string):

#Initializaing a empty dictionary

character_counter = {}

#converting all the characters to lowercase

string_lower = string.lower()

for i in string_lower:

#checking if the chacter presents in the dictionary then increase it by one and also to check if the character is alphabet

if i in character_counter and i.isalpha():

character_counter[i] = character_counter[i]+1

#checking if the character not present in the dictionary then assign 1

if i not in character_counter and i.isalpha():

character_counter[i] = 1

#converting the dictionary to list of tuples

list_of_tuples = [(k, v) for k, v in character_counter.items()]

return list_of_tuples

#3rd Part

#initializing a string of characters in alphabets

alphabets = 'a b b b b B A c e f g d h i j k B l m M n o p q r s P t u v w x y z'

print(summarize_letters(alphabets))

#importing the string module

import string

#pulling all the alphabets

alphabet = set(string.ascii_lowercase)

#checking if our hardcoded string has all the alphabets

if set(alphabets.lower()) >= alphabet:

print('The string ' +alphabets+' has all the letters in the alphabet ')

You might be interested in
Exercise 3.6.9: 24 vs. "24"5 points
Anton [14]

This is all you need to do for this one add quotes around the number to make it a string. Then for the question I don't know if you need to answer it but I said that when there is only one string it creates and addition problem of 24 + 24 and then when there are two strings it puts them right next to each other making it look like the number 2424.

7 0
2 years ago
1. Do you consider Facebook, MySpace, and LinkedIn forms of disruptive or sustaining technology? Why?
Mrrafil [7]
It mainly just depends on if you "misuse" them.
8 0
2 years ago
The term that refers to the programmer reading the program from the beginning and stepping through each statement is _________.
Wewaii [24]

Answer: Desk checking

Explanation:

 The desk checking is one of the type of informal way manual testing in which the programmer use this method for evaluating or checking the coding or the different types of algorithm logic in the system.

  • It helps in identifying the errors in the program so that it can be executed properly without any interruption in the system.
  • It is one of the effective way for the error detection and also known as the modern debugging tool.

According to the given question, the desk checking is the term which is used to refers to the programmers for reading the given program step by step each statement. Therefore, Desk checking is the correct answer.

Therefore, Desk checking is the correct answer.

5 0
2 years ago
Assign test_stat_72 to the value of the test statistic for the years 1971 to 1973 using the states in death_penalty_murder_rates
Alika [10]

Answer:

Find attached below the solution and explanation to the problem.

Explanation:

3 0
2 years ago
ANSWER AS SOON AS POSSIBLE: When I try to join roblox adopt me it says: "Roblox Datastore servers are currently down. Please rej
masha68 [24]
Bro This is homework no roblox
7 0
2 years ago
Read 2 more answers
Other questions:
  • Manny is a personal trainer. He gives his client an endurance test each week. He would like to illustrate how much the client ha
    7·2 answers
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • For any element in keysList with a value greater than 60, print the corresponding value in itemsList, followed by a semicolon (n
    14·2 answers
  • Design a program that asks the user for a series of names (in no particular order). After the final person’s name has been enter
    5·1 answer
  • Ciscon Telecom is a mobile operator in the European Union. The company provides personalized services to its customers, and its
    8·2 answers
  • Sensors and devices connected to a model are examples of which of the following?
    6·2 answers
  • c Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in a
    10·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
  • Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than
    8·1 answer
  • In a particular field, there are trees in a l single row from left to right. Each tree has a value V You cut trees from left to
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!