From dc6305b15df1ca7b1b7260f6decb6336ae8287b0 Mon Sep 17 00:00:00 2001 From: thanatos007 Date: Wed, 7 Oct 2015 21:54:39 +0000 Subject: [PATCH 1/3] Hello --- solutions/01_hello_html/Untitled1.html | 9 +++++++++ solutions/01_hello_html/index.html | 0 solutions/02_headBody_html/Untitled1.html | 9 +++++++++ solutions/02_headBody_html/index.html | 0 solutions/09a_length/Untitled1.html | 10 ++++++++++ solutions/09a_length/Untitled2.html | 10 ++++++++++ solutions/09a_length/index.html | 0 solutions/09a_length/length.js | 5 +++++ solutions/10_roman_js/roman.js | 13 +++++++++++++ 9 files changed, 56 insertions(+) create mode 100644 solutions/01_hello_html/Untitled1.html create mode 100644 solutions/01_hello_html/index.html create mode 100644 solutions/02_headBody_html/Untitled1.html create mode 100644 solutions/02_headBody_html/index.html create mode 100644 solutions/09a_length/Untitled1.html create mode 100644 solutions/09a_length/Untitled2.html create mode 100644 solutions/09a_length/index.html create mode 100644 solutions/09a_length/length.js create mode 100644 solutions/10_roman_js/roman.js diff --git a/solutions/01_hello_html/Untitled1.html b/solutions/01_hello_html/Untitled1.html new file mode 100644 index 0000000..828a339 --- /dev/null +++ b/solutions/01_hello_html/Untitled1.html @@ -0,0 +1,9 @@ + + + + + + +"Hello, World" + + \ No newline at end of file diff --git a/solutions/01_hello_html/index.html b/solutions/01_hello_html/index.html new file mode 100644 index 0000000..e69de29 diff --git a/solutions/02_headBody_html/Untitled1.html b/solutions/02_headBody_html/Untitled1.html new file mode 100644 index 0000000..36a0693 --- /dev/null +++ b/solutions/02_headBody_html/Untitled1.html @@ -0,0 +1,9 @@ + + + + "Hello!" + + +"World!" + + \ No newline at end of file diff --git a/solutions/02_headBody_html/index.html b/solutions/02_headBody_html/index.html new file mode 100644 index 0000000..e69de29 diff --git a/solutions/09a_length/Untitled1.html b/solutions/09a_length/Untitled1.html new file mode 100644 index 0000000..853d08c --- /dev/null +++ b/solutions/09a_length/Untitled1.html @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/solutions/09a_length/Untitled2.html b/solutions/09a_length/Untitled2.html new file mode 100644 index 0000000..776d543 --- /dev/null +++ b/solutions/09a_length/Untitled2.html @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/solutions/09a_length/index.html b/solutions/09a_length/index.html new file mode 100644 index 0000000..e69de29 diff --git a/solutions/09a_length/length.js b/solutions/09a_length/length.js new file mode 100644 index 0000000..75baeff --- /dev/null +++ b/solutions/09a_length/length.js @@ -0,0 +1,5 @@ + + +var myString = "This is a string"; + +console.log(myString.length); \ No newline at end of file diff --git a/solutions/10_roman_js/roman.js b/solutions/10_roman_js/roman.js new file mode 100644 index 0000000..6589b14 --- /dev/null +++ b/solutions/10_roman_js/roman.js @@ -0,0 +1,13 @@ +var I = 1 +var V = 5 +var X = 10 +var L = 50 +var C = 100 +var D = 500 +var M = 1000 +var number = prompt("What is your number?") + +function roman(){ + +} + From ffbe34f4a2b2445237b59f6ca3fc9b52243eaacf Mon Sep 17 00:00:00 2001 From: thanatos007 Date: Wed, 7 Oct 2015 21:56:30 +0000 Subject: [PATCH 2/3] Deleted File --- solutions/01_hello_html/hello.html | 1 - 1 file changed, 1 deletion(-) delete mode 100644 solutions/01_hello_html/hello.html diff --git a/solutions/01_hello_html/hello.html b/solutions/01_hello_html/hello.html deleted file mode 100644 index d975ef8..0000000 --- a/solutions/01_hello_html/hello.html +++ /dev/null @@ -1 +0,0 @@ -This is just an example! Hehe. \ No newline at end of file From 7466594783107cafe4ee80af1eb026aa7add0180 Mon Sep 17 00:00:00 2001 From: thanatos007 Date: Wed, 14 Oct 2015 21:54:08 +0000 Subject: [PATCH 3/3] Roman --- README.md | 29 ------------- solutions/10_roman_js/roman.html | 0 solutions/10_roman_js/roman.js | 70 ++++++++++++++++++++++++++------ 3 files changed, 57 insertions(+), 42 deletions(-) delete mode 100644 README.md create mode 100644 solutions/10_roman_js/roman.html diff --git a/README.md b/README.md deleted file mode 100644 index bf52266..0000000 --- a/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Scavenger Hunt - Instructions - -1. Fork this repository on GitHub -2. Clone it to your Cloud9 VM: - - ```Bash - $ git clone - ``` - -3. Solve - [clues](https://github.com/ScriptEdcurriculum/curriculum2015/blob/master/unitsYear2/1-JShunt/clues/README.md) - and save under `solutions` directory (separate directory for each clue) -4. Commit your changes: - - ```Bash - $ git add . # to stage all your changes - $ git commit -am 'commit message here' # to commit - ``` - -4. Push to your repository on GitHub: - - ```Bash - $ git push origin master - ``` - -5. Open a Pull Request (PR) to the original fork (TpTScriptEd's) -6. Submit a link to your PR - [here](https://docs.google.com/forms/d/1KbaHfDjgmVDn1446ow7tUjssfNKlrqC9RBnTznNqZgE/viewform) - diff --git a/solutions/10_roman_js/roman.html b/solutions/10_roman_js/roman.html new file mode 100644 index 0000000..e69de29 diff --git a/solutions/10_roman_js/roman.js b/solutions/10_roman_js/roman.js index 6589b14..4677e5a 100644 --- a/solutions/10_roman_js/roman.js +++ b/solutions/10_roman_js/roman.js @@ -1,13 +1,57 @@ -var I = 1 -var V = 5 -var X = 10 -var L = 50 -var C = 100 -var D = 500 -var M = 1000 -var number = prompt("What is your number?") - -function roman(){ - -} - +function IntegerToRoman(input){ + if(input < 1 || input > 1000) + return "This is an invalid number"; +var s =''; +while(input >= 1000){ + s += "M"; + input -= 1000; +} +while(input >= 900){ + s += "CM"; + input -= 900; +} +while(input >= 500){ + s += "D"; + input -= 500; +} +while(input >= 400){ + s += "CM"; + input -= 400; +} +while(input >= 100){ + s += "C"; + input -= 100; +} +while(input >= 90){ + s += "XC"; + input -= 90; +} +while(input >= 50){ + s += "L"; + input -= 50; +} +while(input >= 40){ + s += "XL"; + input -= 40; +} +while(input >= 10){ + s += "X"; + input -= 10; +} +while(input >= 9){ + s += "IX"; + input -= 9; +} +while(input >= 5){ + s += "V"; + input -= 5; +} +while(input >= 4){ + s += "IV"; + input -= 4; +} +while(input >= 1){ + s += "I"; + input -= 1; +} +} \ No newline at end of file