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

Suppose, your friend is building an automated car called “Besla”. He needs to fix the programming of the car so that it runs at a proper speed. Now, write a python program that takes 2 inputs (distance in meters and time in seconds). The program should then print the velocity in kilometers per hour of that car. Also, it should print whether the car is working properly based on the following chart.





Velocity




Information to be printed





Less than 60 km/h




Too slow. Needs more changes.





Between 60 km/h to 90 km/h




Velocity is okay. The car is ready!





Greater than 90 km/h




Too fast. Only a few changes should suffice.





Hollow pattern using / and _ and | right angle triangle

Write a program that calculates the area of a triangle.


Base class name=shape and variables are base,height(protected)


Derived class name=Triangle and member function that returns the formula of triangle.




Problem Statement: Find the average of an array using for and for-each loop

Given a positive integers array find the average of the numbers in that array using for-each loop

This exercise contains a class named NumberAverage with the following methods:

 +FindAverage(int[]) : String  
     - Should take positive integer array as input and return a String with the average calculated
     - The average of the array should be calculated by using a for-each loop 
     - Should send error message if all value in array are not positive
     - Should send error message if array is empty

Mean ,Median and Mode


Given a list of integers,write a program to print the mean,median,and mode.


Mean-The average value of all the numbers

Median- The mid point value in the second list.

Mode-the most common value in the list.if multiple elements with same frequency are present ,print all the values with same frequency in increasing order.


INPUT:


The Input will be a single line containing space-seperated integers.


OUTPUT:


The First line of output should contain the mean,round off the value to 2 decimal places.

The Second line of output should contain the medium,round off the value to 2 decimal places.

The third line of output should contain the mode.

Mean should always be a float value.

Median should be a float value when there are even number of elements. otherwise should be an integer value.

See sample Input?Output for the output format.


INPUT


2 2 2 3 4 4 5 5 6 7 8 8



Sample Output 1

Mean: 4.67

Median: 4.5

Mode: 2



Sample Input 2

2 6 3 1 8 12 2 9 10 3 4


Sample Output 2

Mean: 5.45

Median: 4

Mode: 2 3


Family List:


A list of words is called the Family if the words in the list follow the following rule.

we should be able to obtain each word in the list by

-changing exactly one letter from the previous word in the list

Given a list of words ,determine if the list is a Family or Not a Family

input:

The first line of input is an integer T representing the number of test cases

the first line of each test case has an integer N representing the total number of words

The second line contains N space separated strings

INPUT:

3

3

hip hop top

3

hip top hop

4

teat treat greet meet

output:

family

not a family

not a family

i/p:

3

3

tic tac toe

2

tic tac

3

tet treat greet

o/p:

not a family

family

not a family


Write a C++ program that declares an array list (a one-dimensional array) of 10 components of

type int. Initialize the array in a for loop by using rand() function with some random values

ranging from 0 to 250 and then display the components of array list horizontally by using another

for loop.

Take an integer as an input from user to be searched in the list by comparing the desired item with

each component of the array.

Program will display the index of component if searching is successful otherwise it should display an

appropriate message that “Searched item is not found!”.

Hint: Also include appropriate header files for predefined functions to be used.


# Accept integer number and store it to a list until user input is 0.

# Display the content of the list and size of the list.

# Display the highest and lowest numbers.


Write a program that reads several lines of text from a text file named “data.txt” and prints a table indicating the number of one-

letter words, two-letter words, three-letter words, etc. appearing in the text. For example, if the text file contains Whether ‘tis nobler in the mind to suffer the output should be:

Word Length. Occurrences

1 0

2 2

3 2

4 2 (including ‘tis)

5 0

6 2

7 1


create a c++ program with a function named display that displays 10 random words input by user using array. It should accept spaces and don’t accept numbers. If numbers were input it should say “INVALID INPUT”


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS