Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
9th Edition
ISBN: 9780134801346
Author: FELKE-MORRIS
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 6, Problem 8MC
Program Description Answer
“display: block” is used to display an element as a block of content by empty space above and below it.
Hence, the correct answer is option “C”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
1. The main function creates 5 pixels with random red, green, and blue values. Complete the id_color function to return “red” if the red value is greater than the green and blue, “green” if the green value is greater than the red and blue, and “blue” if the blue value is greater than the red and green. If there is no clear maximum value (for example, if the red and green values are the same) return None. Do not change the main function.
1. The main function creates 5 pixels with random red, green, and blue values. Complete the id_color function to return “red” if the red value is greater than the green and blue, “green” if the green value is greater than the red and blue, and “blue” if the blue value is greater than the red and green. If there is no clear maximum value (for example, if the red and green values are the same) return None. Do not change the main function.
import imageimport random
def id_color(p):'''Returns the dominant color of pixel p'''pass#Your code here to determine the dominant color and return a string identifying it#Hint: get the red, green & blue values and use an if statement to determine which has the highest value
def main():'''Controls the program'''for i in range(5): #Loop 5 timesr = random.randrange(0, 256)g = random.randrange(0, 256)b = random.randrange(0, 256)print(r, g, b) #Show the pixel red, green & blue valuesnew_pixel = image.Pixel(r, g, b)print(id_color(new_pixel))
main()…
10. Tic-Tac-Toe Simulator
Create a JavaFX application that simulates a game of tic-tac-toe. Figure 15-55 shows an
example of the application's GUI. The window shown in the figure uses nine ImageView
components to display the Xs and Os. (You will find images for the X and the O in the
book's Student Sample Files.)
The application should use a two-dimensional int array to simulate the game board in mem-
ory. When the user clicks the New Game button, the application should step through the
array, storing a random number in the range of 0 through 1 in each element. The number 0
represents the letter O, and the number 1 represents the letter X. The application's window
should then be updated to display the game board. The application should display a message
indicating whether player X won, player Y won, or the game was a tie.
Tic Tac Toe
X Wins!
New Game
Chapter 6 Solutions
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Ch. 6.4 - Prob. 1CPCh. 6.4 - Prob. 2CPCh. 6.4 - Prob. 3CPCh. 6.15 - Prob. 1CPCh. 6.15 - Prob. 2CPCh. 6.15 - Prob. 3CPCh. 6 - Prob. 1MCCh. 6 - Prob. 2MCCh. 6 - Prob. 3MCCh. 6 - Which of the following configures a class called...
Ch. 6 - Prob. 5MCCh. 6 - Prob. 6MCCh. 6 - Prob. 7MCCh. 6 - Prob. 8MCCh. 6 - Prob. 9MCCh. 6 - Prob. 11FIBCh. 6 - Prob. 12FIBCh. 6 - The ____________ is always transparent.Ch. 6 - Prob. 14FIBCh. 6 - Prob. 15FIBCh. 6 - Prob. 1AYKCh. 6 - Prob. 2AYKCh. 6 - Prob. 3AYKCh. 6 - Prob. 1HOECh. 6 - Prob. 2HOECh. 6 - Prob. 3HOECh. 6 - Prob. 4HOECh. 6 - Prob. 5HOECh. 6 - Prob. 6HOECh. 6 - Prob. 7HOECh. 6 - Prob. 8HOECh. 6 - Prob. 9HOECh. 6 - Prob. 10HOE
Knowledge Booster
Similar questions
- Assignment For assignments 1 and 2, your Big-O notation and justification will be written in the HTML section of JSFiddle. You will be using the Javascript array Programming Assignment Part 1 – Using your JSFiddle account and JavaScript, you will create a program that will instantiate an integer array of a specified size. This means you must create a text box interface and a button “Create Array”. Put a default value of 100 in the Text Box. When the user clicks “Create Array” create an array and fill each array element with a random integer between 1 and 100. You will need to research the random function to do this (the JavaScript function is Math.random()). This array should be a global variable. You will next need an interface (same JSFiddle) with a second and third Text Box and button. The button will say “Insert into Array”. It will trigger a function that will read a number from the second Text Box and insert it into the array at the index of the third Text Box. This will be done…arrow_forward21. Which properties will extend a grid item so that it covers multiple rows and columns, specifically the area from row gridlines 3 to 5 and from column gridlines 1 to 3? Group of answer choices a. grid-row: 3/5; grid-column: 1/3; b. grid-row: 2/4; grid-column: 4; c. grid-column-start: 3; grid-column-end: 5; d. grid-column-start-end: 1/3; grid-row-start-end: 3/5;arrow_forwardTheme : arithmetic application for primary school students. Write a new HTML form with JavaScript codes that accept the student's name, program, age, gender, and state ( may add other input as well). The HTML page accepts 2 numbers and the user will select one of the buttons to perform the selected function. It will allow user to repeat the task and display all input and result of calculation accordingly. It also allow user to exit the application and allow user to input numbers and select buttons that perform each of the following functions respectively : -Addition, Subtraction, Multiplication, Division, Modulusarrow_forward
- Please help me with this. I am having trouble understanding what to do Please create the image below using the Sample JavaScript below. Thank you JavaScript Sample Code: // For each exercise, you will want to copy and rename this function. function problem_09() { /* this statement defines an object reference to the html element that has the ID "output". You can output your results to this object. */ var outputObj = document.getElementById("output"); // this statement receives some data from the user and parses it to integer var a = parseInt(prompt("Please enter a number: ", "")); /* this statement adds a message to our output object you will need to change the message to be appropriate for each exercise. */ outputObj.innerHTML = "Input number: " + a + "<br><br>The number of 5s: "; // You will need to write your own code HERE to translate // your flowcharts to functional code. Add your results // to…arrow_forwardbody { font-family: Georgia, serif; font-size: 100%; line-height: 175%; margin: 0 15% 0; background-color:rgb(210,220,157); background-image: url("/Users/332bo/Desktop/Week_9_Lab/images/bullseye.png"); /* Rounded Shape image */ /* background-repeat:round space; */opacity: 0.5; background-size: contain; } header { margin-top: 0; padding: 3em 1em 2em 1em; text-align: center; border-radius:4px; background-color:hsl(0, 14%, 95%); background-image: url("/Users/332bo/Desktop/Week_9_Lab/images/purpledot.png"); background-repeat: repeat-x; } a { text-decoration: none; color:rgb(153,51,153); } a:visited { color: hsl(300, 13%, 51%); } a:hover { background-color: #fff; } a:focus { background-color: #fff; } a:active{color:#ff00ff;} h1 { font: bold 1.5em Georgia, serif; text-shadow: 0.1em 0.1em 0.2em gray; color: rgb(153,51,153);} h2 { font-size: 1em; text-transform: uppercase; letter-spacing: 0.5em; text-align: center; color:rgb(204,102,0); }dt { font-weight: bold; } strong { font-style: italic; }…arrow_forward10. Tic-Tac-Toe SimulatorCreate a JavaFX application that simulates a game of tic-tac-toe. Figure 15-55 shows anexample of the application’s GUI. The window shown in the figure uses nine ImageViewcomponents to display the Xs and Os. (You will find images for the X and the O in thebook’s Student Sample Files.)The application should use a two-dimensional int array to simulate the game board in memory. When the user clicks the New Game button, the application should step through thearray, storing a random number in the range of 0 through 1 in each element. The number 0 represents the letter O, and the number 1 represents the letter X. The application’s windowshould then be updated to display the game board. The application should display a messageindicating whether player X won, player Y won, or the game was a tiearrow_forward
- Form validation aims to make the user comfortable while downloading images from websites. O True False QUESTION 8 The isNaN() function verifies whether a value is an illegal number. O True O False QUESTION 9 Moving a mouse over an element is an example of events. O True O Falsearrow_forwardurgent plzzzarrow_forwardMurach's javascript and Jquery 4th edition (ch9 animation) I need help with this assignment, please. thanks Modify a carousel to use animationIn this exercise, you’ll modify a carousel application so that when an image in the carousel is clicked, an enlarged image is displayed using animation.1. Open the application in this folder:carouselThen, run the application and notice that an enlarged image of the first book in the carousel is displayed.2. Review the HTML for the application, and notice that it contains an img element with an id of “image” following the heading. Also notice that the href attributes of the <a>elements in the carousel are set to the URL of the enlarged image to be displayed when the associated carousel image is clicked.3. Code an event handler for the click event of the <a> elements in the list. This event handler should start by getting the URL for the image to be displayed. Then, it should assign this URL to the enlarged image.4. Add animation to…arrow_forward
- IN HTML and CSSarrow_forwardWhen a CSS stylesheet is used and class="btn-group" is found in HTML, what CSS selector would style that HTML? A) btn-group B) #btn-group C) .btn-group D) :btn-grouparrow_forwardUsing React create a header component that displays a logo and company name. It should be able to welcome a user to the site or ask them to sign in, depending on boolean input. Create a landing page component that tells the user about the company. Create a product component that displays information about the products that the company sells. Edit your existing App.js file so that it displays the header component, the landing page component and at least three product components. Use an array of values and props to do this. Pass props to the header component to specify whether the user is logged in or not.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT