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
harina [27]
3 years ago
7

Python3

Computers and Technology
1 answer:
Tems11 [23]3 years ago
8 0

Answer:

Following are the program in the Python Programming Language:

def countLetter(words):

   #set dictionary

 di = {}

 for i in words: #set for loop

 #if key exists in di or not

   if di.get(i):

 #if exists count increased

     di[i] += 1

   else: #otherwise assign with key

     di[i] = 1

   # return di

 return di

def main():

 #get input from the user

 words = input("Enter the word: ")

 #store the output in function

 letter = countLetter(words)

 #set for loop

 for i in letter:

   print(i, ":", letter[i])  #print output with :

#call main method

if __name__ == "__main__":

 main()

Explanation:

Here, we define the function "countLetter()" and pass the argument "words" in parameter and inside it.

  • we set the dictionary data type variable "di".
  • we set the for loop and pass the condition inside it we set if statement and increment in di otherwise di is equal to 1.
  • we return the variable di.

Then, we define the function "main()" inside it.

  • we get input from the user in the variable "words".
  • we store the return value of function "countLetter()" in the variable "letter".
  • we set for loop to print the output.

Finally, we call the main method.

You might be interested in
On the Loan worksheet in cell c9 enter PMT function to calculate the monthly payment for the Altamonte springs 2018 facilities l
Delicious77 [7]

Answer and Explanation:

First of all we should have to know about PMT

PMT

stands for payment .payment that you want to send and receive.It is used in financial calculators and equation. It is a payment that return the periodic payment for a loan.

From the given statement we have to calculate the PMT  for this purpose .

let us consider example where we take loan amount and have some interest and then calculate it.

loan of amount = $6000.00

Interest rate = 4.20%

period per year=15

period = 60

then monthly payment = $ 111.40

Using Excel then we get the monthly payment in cell C9

as calculations has been shown in the excel.

where you can get function who returns a positive value.

6 0
3 years ago
You use the _____ sheet in the format cells dialog box to position data in a cell by centering it, for example.​
Oliga [24]
You use the Alignment sheet in the format cells dialog box to position data in a cell by centering it, for example. Generally along the middle branch is a line or centerline of the definite pipeline on a scale of whatever is indicated.
3 0
3 years ago
URGENT!!! Which statement is true with regard to bitmap images?
liberstina [14]

Answer:

<u><em>D. You can modify colors easily and quickly.</em></u>

Explanation:

8 0
3 years ago
Read 2 more answers
Exercise #3: Write a c++ program that reads, from a file called numbers.in, up to 10 numbers, counts and adds the positive value
Gre4nikov [31]

I don't know

Thanks for the points

3 0
3 years ago
Read 2 more answers
"Welcome"; is an example of a _________ variable.
nekit [7.7K]

Answer:

String

Explanation:

It is because we use double quotes (" ") in string variable.

in boolean we only use true or false.

in character we use single quotes

in char also we use single quotes.

<em>HOPE</em><em> </em><em>IT</em><em> </em><em>HELPS</em><em> </em>

<em>HAVE</em><em> </em><em>A</em><em> </em><em>NICE</em><em> </em><em>DAY</em><em> </em><em>:)</em><em> </em>

<em>XXITZFLIRTYQUEENXX</em><em> </em>

5 0
3 years ago
Other questions:
  • Obtain a file name from the user, which will contain data pertaining to a 2D array Create a file for each of the following: aver
    5·1 answer
  • Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
    11·1 answer
  • Describe three perimeter intrusion detection systems and give an example of one that you have seen deployed either at work or an
    8·1 answer
  • What happens if none of the selector values match selector in a simple case expression in pl/sql
    6·1 answer
  • People think that they can send email messages from their personal computers and that it cannot be traced. This is called the __
    13·1 answer
  • A ……………………………is used to verify the identity of a website and is issued to the owner of the website by an independent and recogni
    7·2 answers
  • Write a program to check whether the number is odd or even using 'if' statement in python
    13·1 answer
  • What is the most likely reason a company would use enterprise software?
    14·1 answer
  • You are the system administrator for Precision Accounting Services, which employs 20 accountants and 25 accounting assistants. T
    13·1 answer
  • Functions are used to reuse the codes number of times in program
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!