Roshambo Code Challenge

Here's the Roshambo coding assignment.

If you want to pass the AWS Certification exams, you need to know a little bit of code. Not a lot, but you do need to know your way around web pages, Java files and modern data exchange formats like YAML and JSON.

  1. Drag from the left to the right to sort the scrambled Rock-Paper-Scissors code.
  2. When completed, copy the Roshambo HTML and JavaScript code into Notepad++.
  3. Save your HTML file as roshambo.html on your desktop.
  4. Open your roshambo.html file in Chrome and view your page in a web browser!
  5. You should lint your code when you get it to work.
JavaScript for AWS Exam
Here's what the HTML, JavaScript and 'styled' Roshambo example will look like when finished.

WARNING: The dragging and dropping function doesn't work well on mobile.

  • Scrambled
  • <!DOCTYPE html>
  • .feedback {color: red; margin: 50px;}
  • <head>
  • <meta charset="utf-8">
  • <html>
  • <style>
  • <a href="#" onclick="playRoshambo('rock')"> rock </a> &nbsp;
  • <a href="#" onclick="playRoshambo('scissors')"> scissors </a> &nbsp;
  • .highlighted {border: 2px red solid}
  • </head>
  • p { font-family: verdana; }
  • <title>Rock Paper Roshambo</title>
  • <body class="highlighted">
  • <p>Which one will it be?</p>
  • </style>
  • <a href="#" onclick="playRoshambo('paper')"> paper </a> &nbsp;
  • <div id="results" class="feedback"></div>
  • body { color:navy; margin: 25px;}

  • } // end rock if
  • <script>
  • } // end paper if
  • </html>
  • result = "tie"
  • } // end method
  • } // end scissors if
  • if (clientGesture=='paper') {
  • </body>
  • if (clientGesture=='scissors') {
  • document.getElementById('results').innerHTML = result;
  • result = "win"
  • </script>
  • if (clientGesture=='rock') {
  • playRoshambo = function(clientGesture) {
  • result = "lose"
  • Sorted
  • Declare the document type
  • Start your html
  • Put something here
  • Page encoding
  • Page title
  • Put something here
  • Make all body text navy blue
  • Change paragraph font family
  • Put something here
  • Highlight with a red border
  • Put something here
  • End head
  • Put something here
  • Prompt the user
  • rock link
  • Put something here
  • anchor tag
  • Display results

  • start the script
  • declare the method
  • client picks rock
  • it's a tie
  • end rock if
  • client picks paper
  • You're a potato!
  • Put something here
  • Put something here
  • Put something here
  • Put something here
  • Dynamically update the HTML
  • Put something here
  • 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.