Matrix Rotations
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 first line contains a single integer N.
Next N lines contain N space-separated integers Aij (i - index of the row, j - index of the column).
Next lines contain various operations on the array. Each operation on each line (Beginning either with R, U or Q).
-1 will represent the end of input.
Output
For each Query operation print the element present at row index K and column index L of the matrix in its current state.
The formula for normalizing data-in a vector x-into the range [0,1] is given by
Z1=(x1-min(x))/(max(x)-min(x))
implement the formula above in a function
Right Triangle
Given a number N, write a program to print a triangular pattern of N lines with numbers as shown below.
Input
The input will be a single line containing a positive integer (N).
Output
The output should be N rows with numbers.
Note: There is no space between the numbers.
Explanation
For example, if the given number of rows is 4,
your code should print the following pattern
1
121
12321
1234321
Sample Input 1
4
Sample Output 1
1
121
12321
1234321
Sample Input 2
9
Sample Output 2
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321Split and Replace
Given three strings
inputString, separator and replaceString as inputs. Write a JS program to split the
inputString with the given separator and replace strings in the resultant array with the replaceString whose length is greater than 7.
input:
Javascript-is-amazing
-
programming
output:
programming is amazing
input:
the&lion&king
&
tiger
output:
the lion king
Create a program the user will input 5 grades (choose any subjects and input any grades). Determine individual subjects either passed or failed. Lastly, calculate the average grade and determine whether if passed or failed.
Sample output:
Student Name: Victoria Jimenez
Filipino: 80 - Passed
Math: 74 - Failed
Science: 89 - Passed
English: 74 - Failed
PE: 90 - Passed
Hi Victoria Jimenez, Your Average Grade is 81.4 and you are PASSED!
*If the grade is failed the output should be
Hi Victoria Jimenez, Your Average Grade is 74.3 and you are FAILED!
Given a sentence S, write a program to print the frequency of each word in S. The output order should correspond with the word's input order of appearance.
Input
The input will be a single line containing a sentence S.
Output
The output contains multiple lines, with each line containing a word and its count separated by ": " with the order of appearance in the given sentence.
Explanation
For example, if the given sentence is "Hello world, welcome to python world", the output should be
Hello: 1
world: 2
welcome: 1
to: 1
python: 1
Sample Input 1
Hello world welcome to python world
Sample Output 1
Hello: 1
world: 2
welcome: 1
to: 1
python: 1
Sample Input 2
This is my book
Sample Output 2
This: 1
is: 1
my: 1
book: 1In this assignment, let's build a Book Search page by applying the concepts we learned till now.
Refer to the below image.
Instructions:
By following the above instructions, achieve the given functionality.
Use this Background image:
https://assets.ccbp.in/frontend/dynamic-webapps/book-search-bg.png
CSS Colors used:
Text colors Hex code values used:
#323f4b
#ffffff
CSS Font families used:
Write a program using two-dimensional array that searches a number and display the number of time it appears on the list of 10 input values.
Bookmark Maker
In this assignment, let's build a Bookmark Maker by applying the concepts we learned till now.
Refer to the below image.
Instructions:
Warning
By following the above instructions, achieve the given functionality.
CSS Colors used:
Background colors Hex code values used:
#2d3a8c
#ffffff
#f5f7fa
#21396c
Text colors Hex code values used:
#323f4b
#ffffff
#7b8794
#dc3545
Border Colors Hex code values used:
#cbd2d9
#e4e7eb
CSS Font families used:
3.25.1: LAB: Exact change c++ Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.