Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Installation Instructions
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Git Lab 1
# Vedant Chanshetty

<ins>**The “RESOURCES”**</ins>

* https://stackoverflow.com/questions/3003476/get-underlined-text-with-markdown
1 change: 1 addition & 0 deletions git-lab1
Submodule git-lab1 added at 39fb01
Empty file added gitignore
Empty file.
40 changes: 40 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css">
</head>
<body>
<section id="background">

</section>
<form id="console">
<div class='option'>
<label for="username">Username:</label>
<input id="username" type="text"/>
</div>
<div class='option'>
<label for="password">Password:</label>
<input id="password" type="text"/>
</div>
<div class='option'>
<input id="blue" type="radio" name="color"/>
<label for="blue">Blue</label>
<input id="green" type="radio" name="color"/>
<label for="green">Green</label>
<input id="red" type="radio" name="color"/>
<label for="red">Red</label>
<input id="purple" type="radio" name="color"/>
<label for="purple">Purple</label>
<input id="yellow" type="radio" name="color"/>
<label for="yellow">Yellow</label>
<input id="orange" type="radio" name="color"/>
<label for="orange">Orange</label>
<input id="other" type="radio" name="color"/>
<label for="other">Other</label>
</div>
<button type="submit" value="Submit">
Submit
</button>
</form>
</body>
</html>
45 changes: 45 additions & 0 deletions problem1.js
Original file line number Diff line number Diff line change
@@ -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])}
}
}

}
}
27 changes: 27 additions & 0 deletions problem2.py
Original file line number Diff line number Diff line change
@@ -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)
64 changes: 64 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -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;
}