Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
1
respuesta

Este es mi "Guessing Game" Source Code

<meta charset="utf-8">
<!--Guessing game by Walter Spinelli-->

<!DOCTYPE html>
<html>
<head>
<center>
<link href="style.css" rel="stylesheet" />
<h1>Guessing Game</h1>
</body>
</html>


<script>

function lineJump() {
document.write("<br>")
}


function print(phrase) {
    document.write(phrase);
    lineJump();
}

var thoughtNumber = Math.round(Math.random()*10);
var guessedNumber = parseInt(prompt("Please enter a number between 0-10."));



if (thoughtNumber == guessedNumber){

    print("You guessed correctly! You're awesome!");

}


if (thoughtNumber != guessedNumber) {

    print("Sorry, that was the wrong number. The right number was " + thoughtNumber + ". Best luck next time.");

}

</script>

</center>


<center><h4> Restart the Guessing Game by pressing <a href="GuessingGame.html">here</a></h4></center>
1 respuesta

Hola Walter, espero estés muy bien.

Felicitaciones por tu aprendizaje. Estamos priorizando el foro para postear dudas, así optimizamos el tiempo de respuesta para ustedes.

Para no dejar de compartir códigos, actividades y ejercicios, creamos un canal en Discord (#compartatucodigo) donde puedes compartir, dar y sugerir mejoras con el resto de tus compañeros.

Si este post te ayudó, por favor, marca como solucionado ✓. Continúa con tus estudios