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
Algebraic concepts that include certain words and phrases and
Veseljchak [2.6K]

Answer:

Boolean Operators

Explanation:

When performing a boolean search, boolean operators allow users to combine keywords with operators (or modifiers) such as AND, NOT and OR to further produce more relevant results.

The boolean operators AND and OR are used to include certain words and phrases during the search while the  boolean operator NOT is used to exclude certain words and phrases.

6 0
3 years ago
Top/Bottom Rules allow a user to apply conditional formatting to cells that fall within the top or bottom numbers or percentile.
vfiekz [6]

The numbers of  items that the user can include in the rule is the top or bottom 100 items only.

<h3>What is Top/Bottom Rules?</h3>

Top/Bottom Rules is known to be a rule where there is a premade form of conditional formatting which is often used in Excel to alter the set up  of cells in a range.

Note that the Top/Bottom Rules will allow a user to make changes to the top or bottom 100 items only as it only pertains to things that are up and those that are at the bottom.

Learn more about Top/Bottom Rules from

brainly.com/question/1862654

7 0
1 year ago
A combination lock has the following basic properties:
fomenos

Answer:

public class CombinationLock {

   

    private int combinationNumber1 = 0;

    private int combinationNumber2 = 0;

    private int combinationNumber3 = 0;

   

   CombinationLock(int combinationNumber1, int combinationNumber2, int combinationNumber3){

       this.combinationNumber1 = combinationNumber1;

       this.combinationNumber2 = combinationNumber2;

       this.combinationNumber3 = combinationNumber3;

   }

   

   public boolean open(int number1, int number2, int number3){

       if(number1 == combinationNumber1 && number2 == combinationNumber2 && number3 == combinationNumber3)

           return true;

       else

           return false;

   }

   

   public boolean changeCombo(int number1, int number2, int number3, int newNumber1, int newNumber2, int newNumber3){

       

       if (open(number1, number2, number3)){

           combinationNumber1 = newNumber1;

           combinationNumber2 = newNumber2;

           combinationNumber3 = newNumber3;

           return true;

       }else

           return false;

   }

}

Explanation:

- <em>Three variables</em> are created to hold the combination.

- A <em>constructor</em> is created to set the combination.

- A boolean method called <em>open</em> is created to check if the given numbers are correct, and <u>returns true</u> (<u>otherwise returns false</u>).

- A boolean method method called <em>changeCombo</em> is created to check if given numbers are correct. If they are correct, it assigns new values for the combination and <u>returns true</u> (<u>otherwise returns false</u>).

5 0
2 years ago
Which of the following is CORRECT about database managementsystem's languages?
scZoUnD [109]

Answer:

Data manipulation languages are used for the retrieval of the,insertion,deletion and modification of data.

Explanation:

Data Manipulation Languages(DML) are used to insert,delete,update,modify the data in the database.

The commands used to do these operations are as following:-

INSERT INTO :-This command is used to insert values in the database.

DELETE:-It is used to delete existing records from the table.

UPDATE:- It is used to modify the records in the table.

SELECT:- It is used to select data from database.

3 0
3 years ago
Who is credited with writing Google's famous page ranking search algorithm?
vaieri [72.5K]
Larry page is the correct answer :)
4 0
2 years ago
Other questions:
  • suppose you need to verify how to correctly use commas. you pen your English textbook and scan the chapter titles in which one w
    15·1 answer
  • Tower defense is included under which genre of game
    15·2 answers
  • What does software alone enable a computer to do? connect to the Internet control processing speeds interact with the user manag
    11·2 answers
  • What is Administrator windows 10
    8·1 answer
  • Brian has been working for a few years now and has saved a substantial amount of money. He now wants to invest 50 percent of his
    12·2 answers
  • what will be the Trade discount and Invoice Amount if the List Price is $400.00 and the Trade Discount Rate is 85%
    14·1 answer
  • Which of the data repositories serves as a pool of raw data and stores large amounts of structured, semi-structured, and unstruc
    9·1 answer
  • Please choose the correct option please tell fast​
    9·1 answer
  • Who ever can get me the lyrics to raining tacos will get 46 points + the crown! i want the song!
    10·2 answers
  • What is the decimal value for the jump control?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!