Juego adivina el número con Python

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Gran vídeo, muchas gracias por tus vídeos

rubenrodenascebrian
Автор

Java Code:

public static void guessNumber(int maxRandomNum){
Scanner sc1= new Scanner(System.in);

System.out.println("\t\tGUESS THE NUMBER BETWEEN 1 AND "+maxRandomNum);
System.out.println("You have 5 Attempts!");

Random random= new Random();
int randomNum=

final int ATTEMPTS=5;
for(int i=0;i<ATTEMPTS;i++){
System.out.printf("Write any Number [Attemps:%d]: ", i+1);
int num=
if(num>randomNum) {
System.out.println("Number is too big");
}
else if(num<randomNum){
System.out.println("Number is too small");
}
else {
System.out.println("YOU WON!");
System.out.println("THE NUMBER IS: "+randomNum);
return;
}
}
System.out.println("GAME OVER!");
System.out.println("THE NUMBER IS: "+randomNum);
}

marktulsoto
Автор

oye me puedes pasar tu dc que quiero hablar contigo

Chiquitorhl