Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Word Count - 2

Given a sentence S, write a program to print the frequency of each word in S, where words are sorted in alphabetical order.

Input

The input will be a single line containing a string S.

Output

The output contains multiple lines, with each line containing a word and frequency of each word in the given string separated by ": ", where words are sorted in alphabetical order.

Explanation

For example, if the given sentence is "Hello world, welcome to python world", the output should be

Hello: 1

python: 1

to: 1

welcome: 1

world: 2

Sample Input 1

Hello world welcome to python world

Sample Output 1

Hello: 1

python: 1

to: 1

welcome: 1

world: 2

Sample Input 2

This is my book

Sample Output 2

This: 1

book: 1

is: 1

my: 1




an ecommerce company plans to give their customers a discount for the new year. the discount will be calculated on the basis of the bill amount is the product of the sum of all odd digits and the sum of even digits of the customer's total bill. if no odd-even digit is represented in the bill amount then 0 will be returned?

A matrix m x n that has relatively few non-zero entries is called sparse matrix. It may be represented in much less than m n space. An mxn matrix with k non-zero entries is sparse if k<<m <n. It may be faster to represent the matrix compactly as a list of the non-zero indexes and associated entries. WAP to represent a sparse matrix using linked list.


Want the full code of this question.
a company is planning a big sale at which they will give their customers a special promotional discount. each customer that purchases a product from the company has a unique customer id numbered from 0 to n-1.

1.andy, the marketing head of the company, has selected bill amounts of the n customers for the promotional scheme. the discount will be given to the customers whose bill amounts are perfect squares. the customers may use this discount on a future purchase. write an algorithm to help andy find the number of customers that will be given discounts?
A company is planning a big sale at which they will give their customers. I want the full code of this question

Write a program to calculate gross and net pay of employee from

basic salary. Create employee class which consists of employee

name, emp_id, and basic salary as its data members. Use

parameterized constructor in the derived class to initialize data

members of the base class and calculate gross and net pay of the

employee in the derived class.


Gardening

We have a task to do Gardening.

Given two boolean values

isGrassTrimmerFound


and

isWaterHosePipeFound

  1. as inputs, create three JS promises using async/await and try/catch blocks. For cutting the grass,
  • resolve with "Grass Trimmed" text, if the
  • isGrassTrimmerFound
  • is true
  • reject with "Grass Trimmer Not Found" text, if the
  • isGrassTrimmerFound
  • is false
  1. For cleaning the garden,
  • resolve with "Garden Cleaned" text
  1. For watering the plants,
  • resolve with "Watered Plants" text, if the
  • isWaterHosePipeFound
  • is true
  • reject with "Water Hose Pipe Not Found" text, if the
  • isWaterHosePipeFound
  • is false

Input

  • The first line of input contains a boolean
  • isGrassTrimmerFound
  • The second line of input contains a boolean
  • isWaterHosePipeFound

Output

  • The output should be a string with the appropriate messages in separate lines

Sample Input 1

Sample Output 1Sample Input 2Sample Output 2


Acronyms

You are given some abbreviations as input. Write a program to print the acronyms separated by a dot(

.) of those abbreviations.

Input

The first line of input contains space-separated strings.

Explanation

Consider the given abbreviation, 

Indian Administrative Service. We need to consider the first character in each of the words to get the acronym. We get the letter I from the first string Indian, we get the letter A from the second word Administrative, and we get the letter S from the third word Service. So, the final output should be I.A.S.

Sample Input 1
Indian Administrative Service
Sample Output 1
I.A.S
Sample Input 2
Very Important Person
Sample Output 2
V.I.P

Average of Given Numbers

You are given space-separated integers as input. Write a program to print the average of the given numbers.

Input

The first line of input contains space-separated integers.

Output

The output should be a float value rounded up to two decimal places.

Explanation

In the example, input is 

1, 0, 2, 5, 9, 8. The sum of all numbers present in the list is 25, and their average is 25/6.

So, the output should be 

4.17.

Sample Input 1
1 0 2 5 9 8
Sample Output 1
4.17
Sample Input 2
1 2 3 4 5
Sample Output 2
3.0

Largest Number in the List

You are given space-separated integers as input. Write a program to print the maximum number among the given numbers.

Input

The first line of input contains space-separated integers.

Explanation

In the example, the integers given are 

1, 0, 3, 2, 9, 8. The maximum number present among them is 9. So, the output should be 9.

Sample Input 1
1 0 3 2 9 8
Sample Output 1
9
Sample Input 2
-1 -3 -4 0
Sample Output 2
0

LATEST TUTORIALS
APPROVED BY CLIENTS