+
Your card is:
+
Number of Characters:
+
1a. Number must be 16 digits
+
1b. All of them must be numbers
+
2. You must have at least two different digits represented
+ (all of the digits cannot be the same)
+
+
3. The final digit must be even
+
4. The sum of all the digits must be greater than 16
+
+
+
+
\ No newline at end of file
diff --git a/Week3/homework/CreditCard Validator/style.css b/Week3/homework/CreditCard Validator/style.css
new file mode 100644
index 000000000..4fe5a061d
--- /dev/null
+++ b/Week3/homework/CreditCard Validator/style.css
@@ -0,0 +1,50 @@
+input {
+ width: 50%;
+ padding: 10px;
+ border: 1px solid #CCC;
+ border-radius: 5px;
+ box-sizing: border-box;
+}
+
+.container {
+ background-color: #EEE;
+ padding: 20px;
+}
+
+#message {
+
+ background: #EEE;
+ color: #000;
+ position: relative;
+ padding: 20px;
+ margin-top: 10px;
+}
+
+#message p {
+ font-size: 15px;
+}
+
+h3 {
+ text-align:center;
+}
+/* Add a green text color and a checkmark when the requirements are right */
+.valid {
+ color: green;
+}
+
+.valid:before {
+ position: relative;
+ left: -5px;
+ content: "✓";
+}
+
+/* Add a red text color and an Xmark when the requirements are wrong */
+.invalid {
+ color: red;
+}
+
+.invalid:after {
+ position: relative;
+ left: 5px;
+ content: "✗";
+}
\ No newline at end of file
diff --git a/Week3/homework/README.md b/Week3/homework/README.md
new file mode 100644
index 000000000..eb8b01bb1
--- /dev/null
+++ b/Week3/homework/README.md
@@ -0,0 +1 @@
+JS1_w3 exercises
diff --git a/Week3/homework/js-exercises/JS1_w3e1_giveCompliment.js b/Week3/homework/js-exercises/JS1_w3e1_giveCompliment.js
new file mode 100644
index 000000000..d002c3063
--- /dev/null
+++ b/Week3/homework/js-exercises/JS1_w3e1_giveCompliment.js
@@ -0,0 +1,23 @@
+'use strict';
+
+function giveCompliment(yourname){ //1
+
+ const compliments = ["great","awesome","hacker","fast","strong","smart","clever","programmer","hired","powerful"]; //1a
+ let rand = Math.floor(Math.random() * compliments.length); //1b
+ console.log(`You are ${compliments[rand]}, ${yourname}!`); //1c
+}
+
+giveCompliment("George"); //2*
+giveCompliment("George");
+giveCompliment("George"); //*2
+
+/*
+1. Write a function named `giveCompliment`
+
+- It takes 1 argument: your name
+- Inside the function create an array with 10 strings. Each string should be a compliment, like `"great"`, `"awesome"`
+- Write logic that randomly selects a compliment
+- Return a string: "You are [COMPLIMENT], [YOUR_NAME]!
+
+2. Call the function three times, giving each function call the same argument: your name.
+*/
\ No newline at end of file
diff --git a/Week3/homework/js-exercises/JS1_w3e2_calcDogYears.js b/Week3/homework/js-exercises/JS1_w3e2_calcDogYears.js
new file mode 100644
index 000000000..dc159d0ab
--- /dev/null
+++ b/Week3/homework/js-exercises/JS1_w3e2_calcDogYears.js
@@ -0,0 +1,17 @@
+'use strict';
+
+function calculateDogAge(age){ //1, 1a
+ age*=7; //1b
+ return (`Your doggie is ${age} years old in dog years!`) //1c
+};
+
+console.log(calculateDogAge(8));
+
+
+
+/*1. Write a function named `calculateDogAge`.
+
+- It takes 1 argument: your puppy's age (number).
+- Calculate your dog's age based on the conversion rate of 1 human year to 7 dog years.
+- Return a string: "Your doggie is [CALCULATED_VALUE] years old in dog years!"
+*/
\ No newline at end of file
diff --git a/Week3/homework/js-exercises/JS1_w3e3_tellFortune.js b/Week3/homework/js-exercises/JS1_w3e3_tellFortune.js
new file mode 100644
index 000000000..6d28760cb
--- /dev/null
+++ b/Week3/homework/js-exercises/JS1_w3e3_tellFortune.js
@@ -0,0 +1,30 @@
+'use strict';
+
+const numChildren = [2, 4, 6, 5, 12]; //2*
+const partnerNames = ["Maria","Giota","Christina","Kostantina","Kaliopi"];
+const locations = ["Greece","Italy","Africa","America","Russia"];
+const jobs = ["programmer","chef","electrician","engineer","lawyer"]; //*2
+
+function tellFortune(childrenCount,partnersName,location,jobTitle){ //1a
+ childrenCount = Math.floor(Math.random() * numChildren.length); //1b*
+ partnersName = Math.floor(Math.random() * partnerNames.length);
+ location = Math.floor(Math.random() * locations.length);
+ jobTitle = Math.floor(Math.random() * jobs.length); //*1b
+
+ return (`You will be a ${jobs[jobTitle]} in ${locations[location]}, and married to ${partnerNames[partnersName]} with ${numChildren[childrenCount]} kids.`); //1c
+}
+
+console.log(tellFortune()); //3
+
+
+
+/*
+1. Write a function named `tellFortune`.
+
+- It takes 4 arguments: number of children (number), partner's name (string), geographic location (string), job title (string).
+- Randomly select values from the arrays.
+- Return a string: "You will be a [JOB_TITLE] in [LOCATION], and married to [PARTNER_NAME] with [NUMBER_KIDS] kids."
+
+2. Create 4 arrays, `numChildren`, `partnerNames`, `locations` and `jobs`. Give each array 5 random values that make sense
+3. Call the function 1 time, by passing the arrays as the argument.
+*/
\ No newline at end of file
diff --git a/Week3/homework/js-exercises/JS1_w3e4_addToShoppingCart.js b/Week3/homework/js-exercises/JS1_w3e4_addToShoppingCart.js
new file mode 100644
index 000000000..76087f412
--- /dev/null
+++ b/Week3/homework/js-exercises/JS1_w3e4_addToShoppingCart.js
@@ -0,0 +1,29 @@
+'use strict';
+
+const shoppingCart = [" bananas"," milk"]; //2
+
+function addToShoppingCart(addItem){ //1 , 1a
+ shoppingCart.push(addItem); //1b*
+ if(shoppingCart.length == 4) shoppingCart.shift(); //*1b
+ return console.log("You bought" + shoppingCart.join() + "."); //1c
+}
+
+addToShoppingCart(" eggs"); //3*
+addToShoppingCart(" apples");
+addToShoppingCart(" fish"); //*3
+
+
+/*
+Let's do some grocery shopping! We're going to get some things to cook dinner with.
+However, you like to spend your money and always buy too many things.
+So when you have more than 3 items in your shopping cart the first item gets taken out.
+
+1. Write a function named `addToShoppingCart`.
+
+- It takes in 1 argument: a grocery item (string)
+- Add grocery item to array. If the amount of items is more than 3 remove the first one in the array
+- Return a string: "You bought [LIST_OF_GROCERY_ITEMS]!"
+
+2. Create an array with 2 predefined strings: `"bananas"` and `"milk"`
+3. Call the function 3 times, each time with a different string as the argument.
+*/
\ No newline at end of file
diff --git a/Week3/homework/js-exercises/JS1_w3e5_totalCost.js b/Week3/homework/js-exercises/JS1_w3e5_totalCost.js
new file mode 100644
index 000000000..22039eab7
--- /dev/null
+++ b/Week3/homework/js-exercises/JS1_w3e5_totalCost.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const cartForParty = {beers:1.75, chips:0.99, cola:1.50, pizza:5.90, energydrink:1.20}; //2
+
+function calculateTotalPrice(obj){ //1, 1a
+ const values = Object.values(obj);
+ let total = 0;
+ for (const value of values) total+=value; //1b
+ return total; //1c
+}
+
+calculateTotalPrice(cartForParty); //3
+
+console.log(`You have to pay $${calculateTotalPrice(cartForParty)}.`);
+
+/*
+You want to buy a couple of things from the supermarket to prepare for a party.
+After scanning all the items the cashier gives you the total price, but the machine a broken! Let's write her a function that does it for her instead!
+
+1. Write a function called `calculateTotalPrice`
+
+- It takes 1 argument: an object that contains properties that only contain number values
+- Add all the number values together
+- Return a number: the total price of all items
+
+2. Create an object named `cartForParty` with 5 properties. Each property should be a grocery item (like `beers` or `chips`) and hold a number value (like `1.75` or `0.99`)
+3. Call the function 1 time, giving it the object `cartForParty` as an argument
+*/
\ No newline at end of file