M7 IA2 Task1 Exercise2 How do you feel?

For this exercise we have to use jQuery, which allow us to play and use different effects on the elements in a html document.

This one is about change and image to another acoording to your mood, that could be sad, happy, gorgeous or indifferent.

I love the music talent show called Operación Triunfo 2017 so I chose to use gif of the contestants.

Here is the button for the html

THE GAME

M7 IA2 Task1 Exercise1 Hide and Seek

For this exercise we have to use jQuery, which allow us to play and use different effects on the elements in a html document.

This one is about 3 different celebrities and if you click in a button it will show how they were when they were kids.

I love music so I chose Lady Gaga, Adele and Ed Sheeran 🙂

Here is the button for the html

GAME

 

 

 

 

M7 IA1 Task3 Guess The Number Irene Arroyo

For this task we must code an entire game called “Guess The Number”. You have to guess a number from 1-100 , you have 10 attempts to win the game.

Code

<html>
<body>
<script>
let presentation = alert(‘Welcome to the Guess The Number Game. You have 10 guesses.’)
var x = Math.floor(Math.random() * 100) + 1;
var turns = 10;
var hint = ‘Guess a number between 1-100!’;

while (turns > 0) {
var guess = prompt(hint +
‘ You have ‘ + turns + ‘ guesses left.’);
if (!guess) break;
guess = Number(guess);
if (guess == x) {
turns = 0;
alert(‘YOU WIN! :-)’);
window.location.href = window.location.href
}
else {
hint = ‘No.’;
if (guess < x) hint += ‘ Higher!’;
if (guess > x) hint += ‘ Lower!’;
turns = turns – 1;
}
}

alert(‘The secret number was ‘ + x + ‘.’);
confirm (‘Play again!’);
window.location.href = window.location.href

</script>
</body>
</html>

GAME