100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSCE 102 Exam 2 with complete solutions. $10.99   Add to cart

Exam (elaborations)

CSCE 102 Exam 2 with complete solutions.

 0 view  0 purchase
  • Course
  • CSCE
  • Institution
  • CSCE

Write a multi-line javascript comment that contains name and home town /Jessica Scicchitano Florence SC/ Write the code to give a variable a value that is your major's name var m='biology' Previous Play Next Rewind 10 seconds Move forward 10 seconds Unmute 0:00 / 0:15 Ful...

[Show more]

Preview 2 out of 6  pages

  • September 10, 2024
  • 6
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSCE
  • CSCE
avatar-seller
tuition
CSCE 102 Exam 2 with complete
solutions




Write a multi-line javascript comment that contains name and home town -
ANSWER- /*Jessica Scicchitano Florence SC*/

Write the code to give a variable a value that is your major's name - ANSWER- var
m='biology'

What does the parselnt( ) do? - ANSWER- takes a string value and makes it a
number value

What does padding and margin property specifies in CSS? - ANSWER- Margin:
how much space between each box model
Padding: space between border and text

code for when paragraph element moused over, font size becomes 32 pt -
ANSWER- <p onmouseover="this.style.fontSize='32 pt'"> Heading </p>

Write the CSS rule to define a solid green border with 2px of width for the H1
elements. - ANSWER- h1{border-style:solid, border-color: green, border-width:
2px;}

Using javascript, a.)prompt the user for their first name - ANSWER- var
n=prompt('Please enter your first name')

b.) Prompt the user for their last name - ANSWER- var m= prompt('please enter
your last name')

c.) using the results from part a and b, say hello to the user in an alert box -
ANSWER- alert('Hello" + n+ m)

, Write the code for a function that takes one number as an arguement and alerts
the user if the number is greater than 5 or not - ANSWER- <script> {function
numb(n1) if (n1>5)
alert (n1+ 'is greater than 5')
else
alert(n1+ 'is not greater than 5')
</script>

write a function that takes two arguments which are id's of two paragraph
elements. This function should change the text color of the first paragraph to
green and the background of the second paragraph to red. - ANSWER- <script>
{function change (alb)
document.getElementById(a).style.color='green'
document.getElementById(b).style.background color='red'}

<p id="para 1" onclick="_________">text 1</p>
<p id="para 2"> text2 </p> - ANSWER- change('para1','para2')

Write code to create the first row of the following table. Start writing code with the
<table> tag and stop after writing enough code to create only the first row of the
table - ANSWER- <table>
<tr>
<th rowspan="3"> USC </th>
<th colspan="2"> CSCE102</th>
</tr>

After the following code has been executed :
var x="7" ; var y="8"; var z=x+y;
What is the vale of variable z? and what is the data type of the variable z? -
ANSWER- 78; string

After the following is executed, what would be the value of the variables m and n?
var m=9; var n=5; m=m +n ;
m= m%n; n=3; - ANSWER- m= 4, n=3

Write a function with no arguments that prompt the user to enter a number and
whether the number entered is even or odd, shows an alert box with a relative
message - ANSWER- <script>
{function number( )
var x= prompt('enter a number')
if (parseln +(x)%2=0)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller tuition. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $10.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

82105 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$10.99
  • (0)
  Add to cart