Book Search
In this assignment, let's build a Book Search page by applying the concepts we learned till now.
Refer to the below image.
https://assets.ccbp.in/frontend/content/dynamic-webapps/book_search_output.gif
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:
Time Converter
In this assignment, let's build a Time Converter by applying the concepts we learned till now.
Refer to the below image.
https://assets.ccbp.in/frontend/content/dynamic-webapps/time-converter-output.gif
Instructions:
By following the above instructions, achieve the given functionality.
Quick Tip
Note
Use this Background image:
CSS Colors used:
Text colors Hex code values used:
#f5f7fa
#000000
#ffffff
CSS Font families used:
A parking garage charges a $2.00 minimum fee to park for up to three hours. The
garage charges an additional $0.50 per hour for each hour or part thereof in excess of
three hours. The maximum charge for any given 24-hour period is $10.00. Assume that
no car parks for longer than 24 hours at a time. Write a script that calculates and
displays the parking charges for each customer who parked a car in this garage
yesterday. You should input from the user the hours parked for each customer. The
program should display the charge for the current customer and should calculate and
display the running total of yesterday's receipts. The program should use the function
calculate-Charges to determine the charge for each customer. Use a prompt dialog to
obtain the input from the user.
Split 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
In 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:
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:
Flats Page
In this assignment, let's build the Sunrise Avenue page by applying the concepts we learned till now. You can use the Bootstrap concepts and CCBP UI Kit as well.
Refer to the below images.
Flats List Page
https://assets.ccbp.in/frontend/content/static-website/flats-output.gif
Note
Use the image URLs given below.
Home Page Background Image
Flats List Card Images
Location Icon
Flats Description Images
CSS Colors used:
Background color Hex Code values:
#f19116
#222222
#ffffff
Text color Hex Code values:
#f19116
#7b8794
#ffffff
#0f0e46
#6c6b70
CSS Font families used:
JavaScript
Split 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.
Quick Tip
Sample Input 1
JavaScript-is-amazing
-
Programming
Sample Output 1
Programming is amazing
Sample Input 2
The&Lion&King
&
Tiger
Sample Output 2
The Lion King
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 colum index L of the matrix in its current state.Explanation
For Input:
2
1 2
3 4
R 90
Q 0 0
Q 0 1
R 90
Q 0 0
U 0 0 6
Q 1 1
-1
Initial Matrix
1 2
3 4
For R 90, clockwise rotation by 90 degrees, the matrix will become
3 1
4 2
For Q 0 0, print the element at row index 0 and column index 0 of A, which is 3.
For Q 0 1, print the element at row index 0 and column index 1 of A, which is 1.
Again for R 90, clockwise rotation by 90 degrees, the matrix will become
4 3
2 1
For Q 0 0, print the element at row index 0 and column index 0 of A, which is 4.
For U 0 0 6, update the value at row index 0 and column index 1 in the initial matrix to 6. So the updated matrix will be,
6 2
3 4
After updating, we need to rotate the matrix by sum of all rotation angles applied till now(i.e. R 90 and R 90 => 90 + 90 => 180 degrees in clockwise direction).
After rotation the matrix will now become
4 3
2 6
Next for Q 1 1, print the element at row index 1 and column index 1 of A, which is 6.
output
3
1
4
6
Sample Input 1
2
1 2
3 4
R 90
Q 0 0
Q 0 1
R 90
Q 0 0
U 0 0 6
Q 1 1
-1
Sample Output 1
3
1
4
6
Sample Input 2
2
5 6
7 8
R 90
Q 0 1
R 270
Q 1 1
R 180
U 0 0 4
Q 0 0
-1
Sample Output 2
5
8
8
but got output:
5
8
5
Output one is success but output 2 is not success
Time Converter:
Instructions:
By following the above instructions, achieve the given functionality.
Quick Tip
Note