Questions: 5 831

Answers by our Experts: 5 728

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

You are given a square matrix A of dimensions NxN. You need to apply the below given 3 operations on the matrix A.


Rotation: It is represented as R S where S is an integer in {90, 180, 270, 360, 450, ...} which denotes the number of degrees to rotate. You need to rotate the matrix A by angle S in the clockwise direction. The angle of rotation(S) will always be in multiples of 90 degrees.


Update: It is represented as U X Y Z. In initial matrix A (as given in input), you need to update the element at row index X and column index Y with value Z.

After the update, all the previous rotation operations have to be applied to the updated initial matrix.


Querying: It is represented as Q K L. You need to print the value at row index K and column index L of the matrix A.

Input





The system shall allow the technician to perform the following operations until the option 5 (exit system) is selected: 1) Add a new order 2) Retrieve an order 3) Deliver an order 4) Print summary report 5) Exit system

Add a new order

The user will add a new cake order request into the system. The system shall store the following cake information into a binary heap. The bakery shop will always prepare an order with nearest delivery date/time. 1. Order ID: Auto generated unique ID to each new job created. 2. Expected delivery Date and time: Delivery date and time 3. Name of the cake: Name based on the flavour of the cake. For example, cheese cake, black forest and etc. 4. Weight: Weight of the cake (0.5kg, 1kg, 2kg) 5. Price: Price of the cake. 6. Status: Status of the order, shall set to “new” when a new order is created.

Note: No built-in classes of the data structure (heap, queue and stack) are allowed. 


Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0 format.


Rotate Matrix Rings


Write a Python Program for Rotate Matrix Rings


The below link contains Rotate Matrix Rings Question and test cases


https://drive.google.com/file/d/1eoKsfv5RRcFLXO1XI5AsKhjLGNhwZDwO/view?usp=sharing


We need all two test cases can be came when code was run. I want exact outputs for all two test cases


Write a program to create a menu-driven calculator that performs basic arithmetic operations (+, -, *, /, and %).


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



Secret Message - 2

Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.

Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.

abcdefghij12345678910

klmnopqr1112131415161718

stuvwxyz1920212223242526Input

For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".

Sample Input 1

python

Sample Output 1

16-25-20-8-15-14

Sample Input 2

Foundations

Sample Output 2

6-15-21-14-4-1-20-9-15-14-19


Ordered Matrix

Given a M x N matrix, write a program to print the matrix after ordering all the elements of the matrix in increasing order.Input


The first line of input will contain two space-separated integers, denoting the M and N.

The next M following lines will contain N space-separated integers, denoting the elements of each list.Output


The output should be M lines containing the ordered matrix.

Note: There is a space at the end of each line.Explanation


For example, if the given M is 3 and N is 3, read the inputs in the next three lines if the numbers given in the next three lines are the following.

1 20 3
30 10 2
5 11 15


By ordering all the elements of the matrix in increasing order, the ordered matrix should be

1 2 3
5 10 11
15 20 30

Sample Input 1

3 3

1 20 3

30 10 2

5 11 15

Sample Output 1

1 2 3

5 10 11

15 20 30

Sample Input 2

2 5

-50 20 3 25 -20

88 17 38 72 -10

Sample Output 2

-50 -20 -10 3 17

20 25 38 72 88




Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.


Temperature Conversion

You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales.

Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.

Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.

Formula to convert from Kelvin K to Celsius C is C = K - 273.

Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively.

The input contains the temperature (a number) and the unit of the temperature scale (C, F, K) without any space.


when I am using above question code i was unable to get units for output.

Foe example Expected output is 
25.0C
77.0F
298.0K

But I am getting as 
25
77.0
298

please explain the errors in the code


LATEST TUTORIALS
APPROVED BY CLIENTS