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
skad [1K]
3 years ago
13

A. Write a Python program to match key values in two dictionaries. Input: {'key1': 1, 'key2': 3, 'key3': 2}, {'key1': 1, 'key2':

2} Output: key1: 1 is present in both x and yB. Write a Python program to sort Counter by value. Input: {'Math': 81, Physics':83, 'Chemistry':87) Output: [('Chemistry', 87), ('Physics', 83), ('Math', 81)
Computers and Technology
1 answer:
KIM [24]3 years ago
8 0

Answer:

Please find the attachment of the code file and its output:

Explanation:

In the first code, two variable "a, b" is defined that holds dictionary value which is defined in the question, in the next step a for loop is declared that hold dictionary key and value and use a method set to check the value is available in the dictionary and use print method to print its value.

In the second code, a package counter is an import as the c for count value, in the next step a variable a is declared, that uses a counter method to hold a dictionary value in its parameter, and in the print method, it uses sort method to print its value.

You might be interested in
Write a function that accepts a pointer to a C-string as an argument and returns the number of words contained in the string. Fo
Anon25 [30]

Answer:

To preserve the original format of the answer, I've added it as an attachment

Explanation:

This line defines the function

int countWords(const char ptr){

   

This line initializes number of words to 0

   int words = 0;

The following iteration is repeated until the last character in the argument is reached

   while(*(ptr) != \0){

This checks if current character is blank

       if(*ptr==  ){

If yes, then it increments number of words by 1

        words++;

 }

This moves the pointer to the next character

       ptr++;

   }

This returns the number of words in the argument

   return words+1;

}

The main begins here

int main() {

This declares user input as a character of 200 length

   char userinput[200];

This prompts user for input

   cout << Enter a string: (200 max): ;

This gets user input

cin.getline(userinput, 200);

This passes the c-string to the function and also prints the number of words

cout << There are  << countWords(userinput)<< words;

Download cpp
4 0
3 years ago
Draw the flowchart to calculate the area of the rectangle 50m length and width 30m.​
marta [7]

Answer:

---- ----

Explanation:

1) Start

2) Rectangle: Read Length and Width.

3) Calculate

4) Print (Calculate)

8 0
3 years ago
Match the feature to its function.
Roman55 [17]

The Matchup of the feature to its function are:

1. Normal view the place where creating and editing occurs .

2. Notes view an area in which information for handouts can be added.  

3. Slide pane the place where the slide order can be changed.

4. Menu bar contains lists of commands used to create presentations  

5. toolbars provide rows of icons to perform different tasks.

<h3>What is the normal view?</h3>

Normal view is known to be the view that is seen or used in editing mode and this is where a person can work a lot of items so that they can create their slides.

Note that Normal view is one that shows slide thumbnails on the left, that is a large window that depicts the current slide, and also has a  section that is often seen below the current slide.

The Matchup of the feature to its function are:

1. Normal view the place where creating and editing occurs .

2. Notes view an area in which information for handouts can be added.  

3. Slide pane the place where the slide order can be changed.

4. Menu bar contains lists of commands used to create presentations  

5. toolbars provide rows of icons to perform different tasks.

Learn more about Normal View from

brainly.com/question/14596820

#SPJ1

6 0
2 years ago
Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function
MA_775_DIABLO [31]

Answer:

if ((b*b - 4*a*c)<0)

    cout << "no real solutions";

return;

Explanation:

To check if "b squared" – 4ac is negative, we use the expression  if ((b*b - 4*a*c)<0). This expression evaluates the 'bsquared' and substracts '4ac' from it. It then compares the resulting value with zero. if it is less than zero it means it is a negative number, so it executes the statement following cout << "no real solutions"; and returns

8 0
4 years ago
.What particular skills does a team leader need in addition to the other skills needed by any team member. (choose all that appl
omeli [17]

Answer:

encourage and support team members

always keep a vision of the “big picture”

communicate frequently with team members

Explanation:

As a team leader, this is important to motivate and encourage team members to move on are especially needed during the hard time to face some challenges or solving some problems.

Besides, a vision of big picture from the team leader will assure the entire team that they are moving in a right direction to achieve a bigger goal despite they are facing a number of challenges/obstacle.

A team work need frequent communication to minimize misunderstanding and to ensure the job allocation and coordination running smooth as expected. A team leader plays the vital role to be proactive in communication with members to make sure every job arrangement are monitored and on track.

6 0
3 years ago
Other questions:
  • 5. You just bought a new hard drive for your computer. You plan to use this as a secondary hard drive to store all your UMA file
    14·1 answer
  • How to find something in the cloud?
    8·1 answer
  • Excel has more than 400 additional functions that perform just about every type of calculation you can imagine. Answer
    6·1 answer
  • 3 thing I learned in ICT
    7·1 answer
  • Which is a tool that allows you to copy formatting from one place and apply it to other places?
    9·1 answer
  • Jennifer is trying to install an anti-malware program on a computer that she believes might be infected. During the installation
    14·1 answer
  • In their legacy system. Universal Containers has a monthly accounts receivable report that compiles data from Accounts, Contacts
    6·1 answer
  • A large lens can be very heavy and can only be supported at the_______.
    13·1 answer
  • Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and re
    6·1 answer
  • What are some limitations when it comes to testing and ensuring program quality? List at
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!