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

DOM Manipulations

The goal of this coding exam is to quickly get you off the ground with the DOM Manipulations.

Use the below reference image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/ce-3-1-2-dom-manipulations-op.png


HTML

<!DOCTYPE html>

<html>


<head></head>


<body>

  <div id="interestsContainer"></div>

</body>


</html>


Dynamically add the

input elements in HTML container element with id interestsContainer to achieve the design.

Note

  • For one input use the htmlFor property to add HTML for attribute.
  • For other input use the setAttribute method to set the HTML attribute for.

for...of loop

The goal of this coding exam is to quickly get you off the ground with the for...of loop.

Use the below reference image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/ce-3-1-3-for-of-loop-op.png


HTML

<!DOCTYPE html>

<html>


<head></head>


<body>

  <div>

    <h1>Cars</h1>

    <ul id="listContainer"></ul>

  </div>

</body>


</html>


JAVASCRIPT


let carBrands = ["Benz", "Ferrari", "Audi", "BMW"];


Achieve the design using the for...of loop to iterate over an array in the JS prefilled code.












Appending Elements Dynamically

The goal of this coding exam is to quickly get you off the ground with Creating and Appending Elements Dynamically with JS.

Use the below reference image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/creating-and-appending-elements-with-js-op.png

HTML

<!DOCTYPE html>

<html>

 <head></head>

 <body>

  <div id="myContainer"></div>

 </body>

</html>


Resources

CSS Colors used:

Text colors Hex code values used:

#0000ff


Counter

The goal of this coding exam is to quickly get you off the ground with Conversions and Conditional Statements.

Use the below reference image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/counter-op.gif

HTML

<!DOCTYPE html>

<html>

 <head> </head>

 <body>

  <p id="counterValue" class="counter-value">0</p>

  <button id="decreaseBtn" class="button" onclick="onDecrement()">DECREASE</button>

  <button id="resetBtn" class="button" onclick="onReset()">RESET</button>

  <button id="increaseBtn" class="button" onclick="onIncrement()">INCREASE</button>

 </body>

</html>

CSS

.counter-value {

 font-size: 36px;

 font-weight: 900;

}


.button {

 color: #ffffff;

 background-color: #0967d2;

 font-size: 14px;

 border-width: 0;

 border-radius: 4px;

 padding: 10px;

}


Swati bought 600 shares of stock at a price of Rs 20 per share. She must pay her stock broker a 2% commission for the transaction.


Armstrong numbers between two intervals



Write a program to print all the Armstrong numbers in the given range



A to B(including A and B). An N-digit number is an Armstrong number if the number equals the sum of the Nth power of its digits.



Input



The first line has an integer



A. The second line has an integer B.



Output



Print all Armstrong numbers separated by a space.


If there are no Armstrong numbers in the given range, print



-1.



Explanation



For



A = 150 and B = 200



For example, if we take number 153, the sum of the cube of digits



1, 5, 3 is



13 + 53 + 33 = 153.



So, the output should be



153.



Sample Input 1


150


200


Sample Output 1


153


Sample Input 2


1


3


Sample Output 2


1 2 3


Sample output 3


200


Sample input 3


-1

Sign In Page

The goal of this coding exam is to quickly get you off the ground with Conversions and Conditional Statements.

Use the below reference image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/signin-op.gif

HTML

<!DOCTYPE html>

<html>


<head></head>


<body>

  <p>Enter your Name</p>

  <input type="text" id="inputElement" />

  <p>Enter your Password</p>

  <input type="password" id="passwordElement" />

  <div>

    <button class="button" id="signInBtn" onclick="signIn()">Sign In</button>

  </div>

  <p id="messageText"></p>

</body>


</html>

CSS

.button {

  color: #ffffff;

  background-color: #0967d2;

  font-size: 14px;

  border-width: 0;

  border-radius: 4px;

  margin: 10px;

  padding: 10px;

}


Dynamic Event Listeners

The goal of this coding exam is to quickly get you off the ground with Adding Event Listeners Dynamically.

Use the below reference image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/adding-event-listeners-dynamically-op.gif

Resources

CSS Colors used:

Text colors Hex code values used:

#0000ff


HTML

<!DOCTYPE html>

<html>

 <head></head>

 <body>

  <div id="myContainer">

   <p>Create h1 Element dynamically by adding event listeners dynamically</p>

   <button class="button" id="createBtn">Create</button>

  </div>

 </body>

</html>

CSS

.button {

 color: #ffffff;

 background-color: #0967d2;

 font-size: 14px;

 border-width: 0;

 border-radius: 4px;

 padding: 10px;

}




Remove and Add Class Names

The goal of this coding exam is to quickly get you off the ground with Adding and Removing Classnames Dynamically.

Use the below reference linkimage.

https://assets.ccbp.in/frontend/content/dynamic-webapps/adding-and-removing-classnames-dynamically-op.gif


HTML

<!DOCTYPE html>

<html>


<head></head>


<body>

  <h1 class="heading-old-styles" id="heading">h1 Element</h1>

  <button id="btnEl" class="button">Remove old styles and add new styles</button>

</body>


</html>


CSS

.heading-old-styles {

  color: #00ff00;

  background-color: #000000;

}


.button {

  color: #ffffff;

  background-color: #0967d2;

  font-size: 14px;

  border-width: 0;

  border-radius: 4px;

  padding: 10px;

}


.heading-new-styles {

  color: #ff0000;

  background-color: #ffffff;

}




Create a method that determines whether a string is a valid hex

code. A hex code must begin with a pound key # and is exactly 6

characters in length. Each character must be a digit from [0-9] or

an alphabetic character from A-F . All alphabetic characters may

be uppercase or lowercase.


LATEST TUTORIALS
APPROVED BY CLIENTS