diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f1e9f88 Binary files /dev/null and b/.DS_Store differ diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..e5fe9a9 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1 @@ +# Installation Instructions diff --git a/README.md b/README.md index 4fed924..2c88f4d 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# Git Lab 1 +# Vedant Chanshetty + +**The “RESOURCES”** + +* https://stackoverflow.com/questions/3003476/get-underlined-text-with-markdown diff --git a/git-lab1 b/git-lab1 new file mode 160000 index 0000000..39fb019 --- /dev/null +++ b/git-lab1 @@ -0,0 +1 @@ +Subproject commit 39fb0194abf6a915ecf44bb25ede7d8dbbd665e4 diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..88f7ada --- /dev/null +++ b/index.html @@ -0,0 +1,40 @@ + + + + + + +
+ +
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/problem1.js b/problem1.js new file mode 100644 index 0000000..428c99f --- /dev/null +++ b/problem1.js @@ -0,0 +1,45 @@ +let input = process.argv[2] //must be entered within single quotes (ex: '$9.87') + +let cleanInput; + +//ensures input is valid +if ((!input)||(input[0] != "$")){console.log("The string must begin with a $")} +else{ + cleanInput = input.replace("$","") + + if (cleanInput[0] == "."){console.log("The string must include a dollar amount")} + + else{ + //split input into dollars and cents + let dotIndex = cleanInput.indexOf(".") + if(dotIndex != -1){ + dollars = cleanInput.substring(0,dotIndex) + cleanInput = cleanInput.substring(dotIndex+1) + } + + //find values of each denomination + dollarInt = Number(dollars); + dollars = [" dollar", " dollars", dollarInt] + centsInt = Number(cleanInput) + + let quarters = [" quarter", " quarters", Math.floor(centsInt/25)] + centsInt = centsInt % 25 + + let dimes = [" dime"," dimes",Math.floor(centsInt/10)] + centsInt = centsInt % 10 + + let nickels = [" nickel"," nickels",Math.floor(centsInt/5)] + centsInt = centsInt % 5 + + let pennies = [" penny"," pennies",centsInt] + + //for each loop to go thru all denoms and output + for (x of [dollars,quarters,dimes,nickels,pennies]){ + if(x[2]>0){ + if(x[2]==1){console.log(x[2]+x[0])} + else{console.log(x[2]+x[1])} + } + } + +} +} diff --git a/problem2.py b/problem2.py new file mode 100644 index 0000000..47d1f70 --- /dev/null +++ b/problem2.py @@ -0,0 +1,27 @@ +import sys + +input = ' '.join(sys.argv[1:]) +if not input: + print("You must provide at least one string") +else: + inputList = input.split() + + lowercaseList = inputList.copy() + for x in range(len(lowercaseList)): + lowercaseList[x] = lowercaseList[x].lower() + + output = [] + for x in range(len(lowercaseList)): + for i in range(len(lowercaseList)): + if(x!=i): + if lowercaseList[x] == lowercaseList[i]: + found = False + for z in range(len(output)): + if inputList[x].lower() == output[z].lower(): + found = True + if not found: + output.append(inputList[x]) + + + for x in output: + print(x) diff --git a/style.css b/style.css new file mode 100644 index 0000000..13202c4 --- /dev/null +++ b/style.css @@ -0,0 +1,64 @@ +*{ + padding: 0; + margin: 0; + box-sizing: border-box; + font-family: 'Times New Roman', Times, serif; +} + +#background{ + background-color: #8a8a8d ; + height: 100vh; + width: 100vw; + +} + +#console{ + background-color: #346094 ; + color: #FFFFFF; + border: 2px solid black; + position: absolute; + top: 50%; + left: 50%; + transform:translate(-50%,-50%); + height:max-content; + width:max-content; + padding: 1%; + display: flex; + flex-direction: column; + width: 80vw; + height: 70vh; +} + +.option { + flex-grow: 1; + display: flex; + align-items: center; + font-size: 25pt; +} +.option > label { + margin: 10px; + flex-grow: 1; + text-align: center; +} +.option > input[type='text']{ + flex-grow: 1; + font-size: 20pt; +} + +input[type="radio"]{ + display: none; +} + +button{ + font-size: 30pt; +} + +input[type='radio'] + label { + background: #8a8a8d; + border: 2px solid black; + padding: 1%; +} +input[type='radio']:checked + label { + font-size: 30pt; + background: lightpink; +} \ No newline at end of file