Code Challenge Details

Here is your coding mission, if you choose to accept it.

  1. Drag from the left to the right to sort the scrambled code.
  2. When completed, copy the sorted code into a text editor.
  3. Then save your file as index.html on your desktop.
  4. Then double click on your index.html file and view your page in a web browser!
  5. You should lint your code when you get it to work.
  6. In production, you'd deploy it to a web server (a.k.a. file server)like Apache.
HTML for AWS Exam
Here's what the HTML and JavaScript Number Guesser example will look like when finished.

WARNING: The drag and drop function is not optimized for mobile devices.

  • Scrambled
  • <html>
  • <button onclick="playTheGame('2')"> 2 </button> &nbsp;
  • <h3 style="color:navy">Want to play a game?</h3>
  • <head>
  • <button onclick="playTheGame('5')"> 5 </button> &nbsp;
  • <p>Pick a number between <b>1</b> and <b>5</b>? <p/>
  • <body style="padding:50">
  • <button onclick="playTheGame('1')"> 1 </button> &nbsp;
  • <div id="results">Results will appear here.</div>
  • <button onclick="playTheGame('4')"> 4 </button> &nbsp;
  • <title>The Number Guesser Game</title>
  • </head>
  • <button onclick="playTheGame('3')"> 3 </button> &nbsp;
  • <h5 style="color:purple; font-weight:bold" >Be <a href="">Scrumtuous!</a></h5>

  • <script>
  • response = response + ". Guess Higher!"
  • playTheGame = function(guess) {
  • </body>
  • magicNumber = Math.floor(Math.random() * 5);
  • response = "You got it correct!"
  • var response = "Nope. It's not " + guess;
  • if (guess > magicNumber) {
  • var magicNumber = Math.floor(Math.random() * 5);
  • response = response + ". Guess Lower!";
  • if (guess == magicNumber) {
  • } // close guess lower if
  • if (guess < magicNumber) {
  • </html>
  • </script>
  • } // close guess higher if
  • response += " The number was " + magicNumber + ".";
  • } // end the if
  • document.getElementById('results').innerHTML = response;
  • } // end the method
  • Sorted
  • Start your html
  • Put something here
  • Webpage title
  • Put something here
  • Start the body
  • Level 3 Heading
  • Prompt for a number
  • First button
  • Put something here
  • Put something here
  • Put something here
  • Fifth button
  • Put something here
  • Be Scrumtuous!

  • script tag
  • Create a magic number
  • Define a method (aka function)
  • Create a default respose
  • Is the guess too high?
  • Put something here
  • Close if
  • Is the guess too low?
  • Put something here
  • Close if
  • You're a tomato!
  • Congratulate them!
  • Reveal the magic number
  • Generate a new magic number
  • Close if
  • Update the div named results
  • End the function/method
  • Close the script tag
  • Almost done!

All Answers Answered

Answers Remain

Practice Exam
AWS Practitioner Mock Exam Five

Here are some morepractice exam questions for the AWS Practitioner Cert. Want to get AWS Practitioner certified? Start here..

Practice Exam
AWS TCO and Design Principles Exam

This AWS practice exam will test you on Practitioner Exam objectives 1.2 and 1.3 on Cloud economics, TCO and architecture design patterns.

Practice Exam
AWS Cloud Concepts and Benefits Practice Exam

Here are 10 sample AWS Cloud Practitioner exam questions on objective 1.1, dealing with Cloud Concepts, AWS business value and the benefits of cloud computing.

Practice Exam
AWS Practitioner Mock Exam Two

AWS Practice Exam Two for people who want to pass the Amazon Practitioner Certification on the first try.

Practice Exam
AWS Practitioner Mock Exam Three

Here are some practice, AWS exam questions. Want to get AWS Practitioner certified? Start here.

Practice Exam
AWS Practitioner Mock Exam One

Want a challenge? Try out this mock AWS Exam practice test!

Practice Exam
AWS Practitioner Mock Exam Four

Here are some practice, AWS exam questions. Want to get AWS Practitioner certified? Start here..

Practice Exam
Some Mock AWS Exam Questions

I'm just testing out my ReactJS application. Want to give it a try? Then take this short mock exam.

The AWS Responsibility Model

These AWS practitioner exam flashcards test you on your knowledge of the AWS responsibility model. Whose responsibilty is cloud infrastructure, anyways?

AWS Cloud Responsibility Model Part II

This is the second drag-and-drop exercise that tests you on your understanding of Amazon's responsibility model for cloud computing.

OpEx versus CapEx Explained

A fun way to learn the difference between OpEx and CapEx for the AWS practioner exam.

TCO, Economics & Cloud Design Principles

Learn sections 1.2 & 1.3 of the AWS Practitioner Exam with these AWS Flashcards on cloud economics, AWS design principles.

The Benefits of Cloud Computing

These AWS flashcards test you on section 1.1 of the AWS practitioner exam, namely the AWS Cloud and its value proposition.