ECE101-Lab5
.pdf
keyboard_arrow_up
School
University of Illinois, Urbana Champaign *
*We aren’t endorsed by this school
Course
101
Subject
Computer Science
Date
Dec 6, 2023
Type
Pages
10
Uploaded by DukeSteel1393
Lab 5: Search Engines
NetID: julesa2
Link to published notebook:
https://www.wolframcloud.com/obj/julesa2/Published/ECE101/Fall2023/E
-
CE101-Lab5.nb
In this lab, we will try to build a web crawler and create a web graph from our results.
We will also calculate the page rank of a node in a web graph.
Crawling the Web
In this part, we will crawl (a small part of) the World Wide Web, build a graph to represent the websites
we crawled.
Let’s set a starting page:
In[90]:=
startURL
=
"https:
//
www.netflix.com
/
browse";
Step 1
Import all the hyperlinks from this page:
In[91]:=
homeHyperlinks
=
Import
[
startURL, "Hyperlinks"
]
Out[91]=
{
https:
//
www.netflix.com
//
, https:
//
www.netflix.com
/
LoginHelp,
https:
//
www.netflix.com
//
, https:
//
policies.google.com
/
privacy,
https:
//
policies.google.com
/
terms, tel:1
-
844
-
505
-
2993,
https:
//
help.netflix.com
/
support
/
412, https:
//
help.netflix.com,
https:
//
netflix.shop
/
, https:
//
help.netflix.com
/
legal
/
termsofuse,
https:
//
help.netflix.com
/
legal
/
privacy, https:
//
help.netflix.com
/
legal
/
corpinfo,
https:
//
www.netflix.com
/
dnsspi, https:
//
netflix.com
/
adchoices
-
us
}
Check how may hyperlinks are present on this page alone:
In[92]:=
Length
[
homeHyperlinks
]
Out[92]=
14
Step 2
Let’s pick a link that is not a phone number or email address or something on Google Maps:
In[93]:=
linkedPages
=
DeleteCases
[
homeHyperlinks,
s
_ /
; StringMatchQ
[
s,
___ ~~
"mailto"
"tel"
"maps"
~~ ___]]
Out[93]=
{
https:
//
www.netflix.com
//
,
https:
//
www.netflix.com
/
LoginHelp, https:
//
www.netflix.com
//
,
https:
//
policies.google.com
/
privacy, https:
//
policies.google.com
/
terms,
https:
//
help.netflix.com
/
support
/
412, https:
//
help.netflix.com,
https:
//
netflix.shop
/
, https:
//
help.netflix.com
/
legal
/
termsofuse,
https:
//
help.netflix.com
/
legal
/
privacy, https:
//
help.netflix.com
/
legal
/
corpinfo,
https:
//
www.netflix.com
/
dnsspi, https:
//
netflix.com
/
adchoices
-
us
}
Step 3
Let’s just pick 1 link at random from this list:
In[94]:=
selectedLink
=
RandomChoice
[
linkedPages
]
Out[94]=
https:
//
help.netflix.com
Step 4
Repeat steps 1, 2, and 3 for the selected link:
In[95]:=
newLink
=
RandomChoice
[
DeleteCases
[
Import
[
selectedLink, "Hyperlinks"
]
,
s
_ /
; StringMatchQ
[
s,
___ ~~
"mailto"
"tel"
"maps"
~~ ___]]]
Out[95]=
https:
//
help.netflix.com
/
en
/
node
/
365?ui
_
action
=
kb
-
article
-
popular
-
categories
Putting it together
We need to repeat steps 1, 2 and 3 for each link we end with.
Here is a function that will do steps 1, 2 and 3, when it is given any URL as an input:
In[101]:=
getLinkedURL
[
link
_]
:
=
RandomChoice
[
DeleteCases
[
Import
[
link, "Hyperlinks"
]
,
s
_ /
; StringMatchQ
[
s,
___ ~~
"mailto"
"tel"
"maps"
~~ ___]]]
2
ECE101-Lab5.nb
In[99]:=
listOfLinks
=
NestList
[
getLinkedURL
[#]
&, startURL, 10
]
Out[99]=
{
https:
//
www.netflix.com
/
browse, https:
//
policies.google.com
/
privacy,
https:
//
policies.google.com
/
privacy
#
infodelete,
https:
//
policies.google.com
/
privacy
#
inforetaining,
https:
//
policies.google.com
/
privacy
/
google
-
partners,
https:
//
www.google.com
/
, http:
//
www.google.com
/
history
/
optout?hl
=
en,
https:
//
accounts.google.com
/
ServiceLogin?passive
=
1209600&continue
=
https:
//
www.
google.com
/
history
/
optout?hl
%
3Den&followup
=
https:
//
www.google.com
/
history
/
optout?hl
%
3Den&hl
=
en&ec
=
GAZAjQI,
https:
//
accounts.google.com
/
TOS?loc
=
US&hl
=
en,
https:
//
policies.google.com
/
privacy?gl
=
US&hl
=
en,
https:
//
myaccount.google.com
/
profile?utm
_
source
=
pp&hl
=
en
}
Create a web graph from these links:
In[102]:=
simpleG
=
Graph
[
MapThread
[#
1
#
2 &,
{
Most
[
listOfLinks
]
, Rest
[
listOfLinks
]}]
,
VertexLabels
Placed
[
"Name", Tooltip
]]
Out[102]=
Putting it together: Advanced (Optional - Extra credit)
Instead of selecting just one hyperlink from each page, we can simultaneously select more than one
and grow the graph in each direction.
Set the number of links you’d like to follow from a page:
In[103]:=
numLinks
=
3
Out[103]=
3
Set the number of hops you’d like to go in the graph:
In[104]:=
numHops
=
3
Out[104]=
3
Note: The larger the values of numLinks and numHops, the longer it will take for the code to execute!!
ECE101-Lab5.nb
3
In[105]:=
g
=
NestGraph
[
Take
[
DeleteCases
[
Import
[#
, "Hyperlinks"
]
,
s
_ /
; StringMatchQ
[
s,
___ ~~
"mailto"
"tel"
"maps"
~~ ___]]
,
numLinks
]
&,
startURL,
numHops,
VertexLabels
Placed
[
"Name", Tooltip
]]
Out[105]=
Problem 1
Change the startURL to a website of your choice, rerun the code above to create another graph. Copy
paste the graph into the answer cell below.
Answer
https :
//
www.netflix.com
/
browse
Answer (Extra Credit)
Problem 2
Looking at the graph, which website do you think has (roughly) the highest PageRank? Why?
Answer
Netflix log in has the high PageRank because it takes you to di
ff
erent websites within the main
4
ECE101-Lab5.nb
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Create a webpage A2-Task2.html.
The webpage is displaying one image. Each time the user moves the mouse out of the image, the image is
changed to another one and one more 'sun' emoji is displayed under the image. When the number of 'suns'
reaches seven (7), all 'suns are deleted (reset) and start to be displayed again. For example, the 8th time user
moves the mouse out of the image, one 'sun' is shown, the 9th time - two 'suns', and so on.
Note:
- You should use two images. Each time the user moves the mouse out of the image, the image is changing. If
an image of "Winter" is displayed it will change to "Summer", and opposite, if an image of "Summer" is
displayed it will change to "Winter".
The special character code for the 'sun' is "☀".
Put the source code of your website A2-Task2.html here.
Make sure you also upload the A2-Task2.zip of all files below.
arrow_forward
Create a webpage A2-Task2.html.
The webpage is displaying one image. Each time the user clicks the image, the image is changed to another one and one more
'globe' emoji is displayed under the image. When the number of 'globes' reaches five (5), all 'globes' are deleted (reset) and start to
be displayed again. For example, the 6th time user clicks the image, one 'globe' is shown, the 7th time - two 'globes', and so on.
Note:
- You should use two images. Each time the user clicks on the image, the image is changing. If an image of "Seaside" is displayed it
will change to "Mountain view", and opposite, if an image of "Mountain view" is displayed it will change to "Seaside".
- The special character code for the 'globe' is "🌏".
arrow_forward
As per our discussion in class in the past few
days, students are expected to write a PHP code
that reads any HTML page and return a list of
HTML tags existing in that page. What you need
to submit it an HTML file that you experiment
with + PHP file that you run to show the tags.
arrow_forward
Hands-On Exercises #7 Superglobals $_GET and $_POST Source: Source: Connolly, R. and Hoar, R., (2018), Fundamentals of Web Development
Before you do the exercises
If you haven’t already done so, you should create a folder in your personal drive for all the exercises. This set of exercises requires a functioning webserver to interpret the PHP code.
Exercise 7-1 Checking for POST
1. 2.
Test lab7‐exercise7-1.php in a browser and notice that it contains a simple one field form that posts the results back to itself.
The first thing to do is detect whether the page was reached through a get (a link followed) or whether the page was arrived by the form being posted.
Edit the displayPostStatus() function as follows and test.
function displayPostStatus() {
if ($_SERVER["REQUEST_METHOD"] == "POST") { echo "Post detected";
} else {
echo "No Post Detected";
}
}
Now when you post the form you see the post detected, and when you enter the URL and hit enter (GET) it does not see the POST.
Next, let…
arrow_forward
Create an Empty Activity Project to implement the following Layouts.
Layouts: one Text, one E-mail, one Image and one Button.
Tips:
- The project’s layout structure is ConstraintLayout.
- The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red.
- The second element is E-mail. You must write your email address under your name, with the textColor = Blue.
- The third element is an image. You can add any image after your name and email with any size you like.
- The fourth element is a button. Place the button on the end of the page and call it ”OK”.
Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application.
Layout’s output:
Please see the attached pic
arrow_forward
Create an Empty Activity Project to implement the following Layouts.
Layouts: one Text, one E-mail, one Image and one Button.
Tips:
- The project’s layout structure is ConstraintLayout.
- The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red.
- The second element is E-mail. You must write your email address under your name, with the textColor = Blue.
- The third element is an image. You can add any image after your name and email with any size you like.
- The fourth element is a button. Place the button on the end of the page and call it ”OK”.
Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application.
Layout’s output:
arrow_forward
Create an Empty Activity Project to implement the following Layouts.
Layouts: one Text, one E-mail, one Image and one Button.
Tips:
- The project’s layout structure is ConstraintLayout.
- The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red.
- The second element is E-mail. You must write your email address under your name, with the textColor = Blue.
- The third element is an image. You can add any image after your name and email with any size you like.
- The fourth element is a button. Place the button on the end of the page and call it ”OK”.
Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application.
Layout’s output:
arrow_forward
JavaScript: Update your shopping list activity to use jQuery instead of (JS) standard document object methods. Your implementation should use jQuery to select, add, remove elements, and react to events instead of DOM methods like getElementById, appendChild, addEventListener, etc.
Below the JS HTML and JS
Shopping List HTML:
<html><head><title>Shopping List</title></head>
<style>body {background-color: #f9f9f9;font-family: arial;}li {list-style: none;padding: 5px;}.addButton {padding: 5px 10px;background-color: #8214c1;border: none;border-radius: 3px;color: white;font-size: 1em;}.deleteButton {background-color: #f9f9f9;color: #8214c1;font-size: 1em;border: none;}input[type=text] {border: none;border-bottom: 1px solid grey;background-color: #f9f9f9;font-size: 1.2em;}input[type=text]:focus {outline: none;}
</style><body><h1>Shopping List</h1>
<ul id='shoppingList'></ul>
<input type="button" class="addButton"…
arrow_forward
7. Use the GeoGebra linked on the Task page of the lesson to find the Steiner points of
graph K6, then insert a screenshot of the graph you created below. Then, find:
n
the Steiner weight
♥
the minimum spanning tree weight.
30
K6
30
Post your screenshot of the graph you created in the space provided below:
Spanning tree weight is:
Steiner weight is:
arrow_forward
CSS , Javascript
A game with blocks
Make a simple game that takes place on a 3 × 3 grid as shown on the below image. Blocks are denoted by letters from A to H and are initially shuffled. The player can drag a chosen block to the empty field. Only one block can reside on a field at any time. When blocks are sorted alphabetically A – H the game is finished.
sample code:<!DOCTYPE html><html>
<title>Boxes</title>
<style>
.box {display: flex;float: left;width: 100px;height: 100px;border: 2px solid red;justify-content: center;align-items: center;margin: 5px;}.item {
display: flex;width: 90px;height: 90px;background-color: seagreen;justify-content: center;align-items: center;font-size: 50px;color: yellow;user-select: none;}
</style>
<script>
function itemDragStart(event) {console.log("Dragging", event.target.id);event.dataTransfer.setData("text", event.target.id);}
function itemDragOver(event) {var targetBox = event.target;console.log("drag over",…
arrow_forward
Web Page:
http://web.archive.org/web/20210411193535/https://docs.python-requests.org/en/master/
Inspect the Title Text (Requests: HTTP for HumansTM). What kind of element is it (what is its HTML tag)?
arrow_forward
https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/9
import java.util.Scan X
FREE AI Java Code
zy Section 14.9 - CS 13 X
Search Results | Cou X
G Google
Homepage - Princip X
Georgia Gateway
A
☆
[]
Help/FAQ
= zyBooks My library > CS 1302: Principles of Programming II home > 14.9: LAB: Ticketing service (Queue)
Given main(), complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending
with-1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue.
Include print statements as shown in the example below.
Ex: If the input is:
Zadie Smith
Tom Sawyer
You
Louisa Alcott
-1
19°C
Mostly cloudy
the output is:
Welcome to the ticketing service...
You are number 3 in the queue.
Zadie Smith has purchased a ticket.
You are now number 2
Tom Sawyer has purchased a ticket.
You are now number 1
You can now purchase your ticket!…
arrow_forward
Html code for sure in this design java
.
arrow_forward
https://en.wikipedia.org/wiki/Greenhouse_gas
Webscraping class:
class WebScraping:def __init__(self,url):self.url = urlself.response = requests.get(self.url)self.soup = BeautifulSoup(self.response.text, 'html.parser')def extract_data(self):data = defaultdict(list)table = self.soup.find('table', {'class': 'wikitable sortable'})rows = table.find_all('tr')[1:]for row in rows:cols = row.find_all('td')data['Country Name'].append(cols[0].text.strip())data['1980'].append(cols[1].text.strip())data['2018'].append(cols[2].text.strip())return data
question #1
class GreenhouseGasData(NamedTuple):
Gas: str
Pre_1750: float
Recent: float
Absolute_increase_since_1750: float
Percentage_increase_since_1750: float
class GreenhouseGasCollection:
def __init__(self, data):
self.data = data
def __repr__(self):
return str(self.data)
def sort_by(self, column):
if column not in GreenhouseGasData._fields:
raise…
arrow_forward
variants/3212612/take/5/
CATEGORY
Sort the items into whether they are benefits or risks of a search engine keeping a record
of your search history.
To place a category, press the item in the answer box, then press the box under the corre-
sponding category.
benefits
Add an answer item!
Answer Bank
risks
Add an answer item!
You can refer back to information you read earlier.
You can see which search result links you have not yet pressed.
A friend may see an embarrassing web search.
A family member may see an ad for a gift you secretly bought for them.
A related search will auto-complete so you do not need to type the whole thing.
Someone with access to search cata could create a scam related to your interests.
arrow_forward
Tracking Down and Eliminating Specific LinksType an example The full linkList2.cpp programme includes methods to remove an item with a specific key value and scan a linked list for a data item with a specific key value. These are the same actions that the LinkList Workshop applet performs, along with placement at the list's beginning.
arrow_forward
Please help me adjust the X-axis on my graphs in Excel spreadsheet.
Range numbers are from 200 to 500 but is graphed 0 to 300.
Link:https://mnscu-my.sharepoint.com/:x:/g/personal/vi2163ss_go_minnstate_edu/EdVWDTGQ2hNJuGHiHPukjuIB9DBRlyoUC8Fuqlxj2E_CQg
Thank you!
arrow_forward
Objective:To add scripting to the existing web page and work with JavaScript Es-6 features like class, object , getter methods and collection.
Problem Description:As part of a simple billing application, you are provided with an html page to obtain inputs for item number, item name, price & quantity. Using the ES-6 collections, add every item object into a Set and iterate through it to find the total cost to be paid. On adding each item object into Set, it must also get added to the table as a new record. Refer to the screenshot.
Following are the files that contain code snippets
index.html
HTML for webpage (complete implementation is given for you). You only have to run this. No change needs to be done in this file.
script.js
Add your code to this file for the functions given.
Procedure to complete the exercise
Class
Properties
Methods
Item
itemNumberitemNamepricequantity
Include constructor with properties and getter methods for Item properties…
arrow_forward
Implement code where comments from a page of HTML code are stripped of HTML formatting.
arrow_forward
Lab 02: Splitting a URL into pieces
URLS are composed of five pieces:
The scheme, also known as the protocol
The authority (may further be divided into the user info, the host, and the port)
The path
The fragment identifier, also known as the section or ref
The query string
Read-only access to these parts of a URL is provided by nine public methods: getFile(), getHost(),
getPort(), getProtocol(), getRef(), getQuery(), getPath(), getUserinfo(), and getAuthority().
Write a Java program which uses these methods to split URLS entered on the command line into their
component parts.
arrow_forward
Data Structure & Algorithm:
Oware (Warri) is a game popular in some countries of the Caribbean and Western Africa. For information about this game please see the various links below.
https://www.bbc.com/news/world-latin-america-56814500
https://en.wikipedia.org/wiki/Oware
https://youtu.be/0paedEX0Ixw
https://www.youtube.com/watch?v=ZkyPd7ftxaw
What programming language and data structure would you use to code this game and why?
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- Create a webpage A2-Task2.html. The webpage is displaying one image. Each time the user moves the mouse out of the image, the image is changed to another one and one more 'sun' emoji is displayed under the image. When the number of 'suns' reaches seven (7), all 'suns are deleted (reset) and start to be displayed again. For example, the 8th time user moves the mouse out of the image, one 'sun' is shown, the 9th time - two 'suns', and so on. Note: - You should use two images. Each time the user moves the mouse out of the image, the image is changing. If an image of "Winter" is displayed it will change to "Summer", and opposite, if an image of "Summer" is displayed it will change to "Winter". The special character code for the 'sun' is "☀". Put the source code of your website A2-Task2.html here. Make sure you also upload the A2-Task2.zip of all files below.arrow_forwardCreate a webpage A2-Task2.html. The webpage is displaying one image. Each time the user clicks the image, the image is changed to another one and one more 'globe' emoji is displayed under the image. When the number of 'globes' reaches five (5), all 'globes' are deleted (reset) and start to be displayed again. For example, the 6th time user clicks the image, one 'globe' is shown, the 7th time - two 'globes', and so on. Note: - You should use two images. Each time the user clicks on the image, the image is changing. If an image of "Seaside" is displayed it will change to "Mountain view", and opposite, if an image of "Mountain view" is displayed it will change to "Seaside". - The special character code for the 'globe' is "🌏".arrow_forwardAs per our discussion in class in the past few days, students are expected to write a PHP code that reads any HTML page and return a list of HTML tags existing in that page. What you need to submit it an HTML file that you experiment with + PHP file that you run to show the tags.arrow_forward
- Hands-On Exercises #7 Superglobals $_GET and $_POST Source: Source: Connolly, R. and Hoar, R., (2018), Fundamentals of Web Development Before you do the exercises If you haven’t already done so, you should create a folder in your personal drive for all the exercises. This set of exercises requires a functioning webserver to interpret the PHP code. Exercise 7-1 Checking for POST 1. 2. Test lab7‐exercise7-1.php in a browser and notice that it contains a simple one field form that posts the results back to itself. The first thing to do is detect whether the page was reached through a get (a link followed) or whether the page was arrived by the form being posted. Edit the displayPostStatus() function as follows and test. function displayPostStatus() { if ($_SERVER["REQUEST_METHOD"] == "POST") { echo "Post detected"; } else { echo "No Post Detected"; } } Now when you post the form you see the post detected, and when you enter the URL and hit enter (GET) it does not see the POST. Next, let…arrow_forwardCreate an Empty Activity Project to implement the following Layouts. Layouts: one Text, one E-mail, one Image and one Button. Tips: - The project’s layout structure is ConstraintLayout. - The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red. - The second element is E-mail. You must write your email address under your name, with the textColor = Blue. - The third element is an image. You can add any image after your name and email with any size you like. - The fourth element is a button. Place the button on the end of the page and call it ”OK”. Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application. Layout’s output: Please see the attached picarrow_forwardCreate an Empty Activity Project to implement the following Layouts. Layouts: one Text, one E-mail, one Image and one Button. Tips: - The project’s layout structure is ConstraintLayout. - The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red. - The second element is E-mail. You must write your email address under your name, with the textColor = Blue. - The third element is an image. You can add any image after your name and email with any size you like. - The fourth element is a button. Place the button on the end of the page and call it ”OK”. Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application. Layout’s output:arrow_forward
- Create an Empty Activity Project to implement the following Layouts. Layouts: one Text, one E-mail, one Image and one Button. Tips: - The project’s layout structure is ConstraintLayout. - The first element is Text. You must write your name in place of “XYZ” with a textSize = 20sp and textColor of Red. - The second element is E-mail. You must write your email address under your name, with the textColor = Blue. - The third element is an image. You can add any image after your name and email with any size you like. - The fourth element is a button. Place the button on the end of the page and call it ”OK”. Implement the previous requirements and include the XML file and screenshot of the layout’s output, after you run the application. Layout’s output:arrow_forwardJavaScript: Update your shopping list activity to use jQuery instead of (JS) standard document object methods. Your implementation should use jQuery to select, add, remove elements, and react to events instead of DOM methods like getElementById, appendChild, addEventListener, etc. Below the JS HTML and JS Shopping List HTML: <html><head><title>Shopping List</title></head> <style>body {background-color: #f9f9f9;font-family: arial;}li {list-style: none;padding: 5px;}.addButton {padding: 5px 10px;background-color: #8214c1;border: none;border-radius: 3px;color: white;font-size: 1em;}.deleteButton {background-color: #f9f9f9;color: #8214c1;font-size: 1em;border: none;}input[type=text] {border: none;border-bottom: 1px solid grey;background-color: #f9f9f9;font-size: 1.2em;}input[type=text]:focus {outline: none;} </style><body><h1>Shopping List</h1> <ul id='shoppingList'></ul> <input type="button" class="addButton"…arrow_forward7. Use the GeoGebra linked on the Task page of the lesson to find the Steiner points of graph K6, then insert a screenshot of the graph you created below. Then, find: n the Steiner weight ♥ the minimum spanning tree weight. 30 K6 30 Post your screenshot of the graph you created in the space provided below: Spanning tree weight is: Steiner weight is:arrow_forward
- CSS , Javascript A game with blocks Make a simple game that takes place on a 3 × 3 grid as shown on the below image. Blocks are denoted by letters from A to H and are initially shuffled. The player can drag a chosen block to the empty field. Only one block can reside on a field at any time. When blocks are sorted alphabetically A – H the game is finished. sample code:<!DOCTYPE html><html> <title>Boxes</title> <style> .box {display: flex;float: left;width: 100px;height: 100px;border: 2px solid red;justify-content: center;align-items: center;margin: 5px;}.item { display: flex;width: 90px;height: 90px;background-color: seagreen;justify-content: center;align-items: center;font-size: 50px;color: yellow;user-select: none;} </style> <script> function itemDragStart(event) {console.log("Dragging", event.target.id);event.dataTransfer.setData("text", event.target.id);} function itemDragOver(event) {var targetBox = event.target;console.log("drag over",…arrow_forwardWeb Page: http://web.archive.org/web/20210411193535/https://docs.python-requests.org/en/master/ Inspect the Title Text (Requests: HTTP for HumansTM). What kind of element is it (what is its HTML tag)?arrow_forwardhttps://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/9 import java.util.Scan X FREE AI Java Code zy Section 14.9 - CS 13 X Search Results | Cou X G Google Homepage - Princip X Georgia Gateway A ☆ [] Help/FAQ = zyBooks My library > CS 1302: Principles of Programming II home > 14.9: LAB: Ticketing service (Queue) Given main(), complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending with-1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue. Include print statements as shown in the example below. Ex: If the input is: Zadie Smith Tom Sawyer You Louisa Alcott -1 19°C Mostly cloudy the output is: Welcome to the ticketing service... You are number 3 in the queue. Zadie Smith has purchased a ticket. You are now number 2 Tom Sawyer has purchased a ticket. You are now number 1 You can now purchase your ticket!…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education