Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

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

Write a Java program that determines a student’s grade.

The program will read three types of scores(quiz, mid-term, and final scores) and determine the grade based on the following rules:

-if the average score >=90% =>grade=A

-if the average score >= 70% and <90% => grade=B

-if the average score>=50% and <70% =>grade=C

-if the average score<50% =>grade=F


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

  • When clicked on the Book Flat button on the Sunrise Avenue Home Page, it must display the Flats List Page.
  • When clicked on each flat in Flats List Page, it must display the respective Flat Details Page.
  • When clicked on Confirm button in Flat Details Page, it must display Sunrise Avenue Home Page
  • When clicked on Back button in Flat Details Page, it must display Flats List Page
  • Try to achieve the design as close as possible.

Resources

Use the image URLs given below.


Home Page Background Image

  • https://assets.ccbp.in/frontend/static-website/flats-list-bg.png


Flats List Card Images

  • https://assets.ccbp.in/frontend/static-website/flats-list-card1-img.png
  • https://assets.ccbp.in/frontend/static-website/flats-list-card2-img.png
  • https://assets.ccbp.in/frontend/static-website/flats-list-card3-img.png


Location Icon

  • https://assets.ccbp.in/frontend/static-website/flats-list-location-icon-img.png


Flats Description Images

  • https://assets.ccbp.in/frontend/static-website/flats-list-d1-img.png
  • https://assets.ccbp.in/frontend/static-website/flats-list-d2-img.png
  • https://assets.ccbp.in/frontend/static-website/flats-list-d3-img.png


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:

  • Bree Serif

Write a program that asks the user to input arbitrary amount of numbers. Use a while loop to display the average of those numbers each iteration. Your while loop should break when the user inputs -1.


Write a program that prints:

(a) all the even numbers between 1 and 100.

(b) all the odd numbers between 1 and 100.

(c) all multiples of 3 between 1 and 100.


Write a program that asks the user to input their age. The program must reject unrealistic input (age > 150 or age < 0) and ask the user to input again until the age is valid.


. Write a program that prints all that counts from 1 to 100


Write a program that displays the day of the week given an integer from 1 to 7. Start from Sunday. The integer should be given by the user.


Write a program to check if a person is eligible for a driving license. There are 2

conditions that must be met. The person should be over 18 years old and they should have

passed the driving test. Create a int variable for the age of the person and a variable of your

choice to indicate if the user has passed/failed the test. Get these values from the user. If

the person is eligible, your program must display &quot;User can drive!&quot; otherwise display &quot;User

cannot drive!&quot;


Tic-Tac-Toe game


Abhinav and Anjali are playing the Tic-Tac-Toe game. Tic-Tac-Toe is a game played on a grid that's three squares by three squares. Abhinav is O, and Anjali is X. Players take turns putting their marks in empty squares. The first player to get 3 of her marks in a diagonal or horizontal, or vertical row is the winner. When all nine squares are complete, the game is over. If no player has three marks in a row, the game ends in a tie. Write a program to decide the winner in the Tic-Tac-Toe game.


Input


The input will be three lines contain O's and X's separated by space.


Output


The output should be a single line containing either "Abhinav Wins" or "Anjali Wins" or "Tie".


Explanation


For example, if the input is

O X O
O X X
O O X 

as three of O's are in vertical row print "Abhinav Wins".



Sample Input 1

O X O

O X X

O O X


Sample Output 1

Abhinav Wins


Sample Input 2

O O X

X X O

X O O


Sample Output 2

Anjali Wins


i want exact sample outputs sir


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


i want exact sample outputs


LATEST TUTORIALS
APPROVED BY CLIENTS