| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -508,7 +508,10 @@ i est plus grand que 3, on arrête | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			--- | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			# Devine nombre | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			# Le jeu | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			On fait deviner un nombre à l'utilisateur, en affichant 'trop grand', 'trop petit' | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			jusqu'à ce qu'il trouve la valeur exacte. | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			--- | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -519,22 +522,19 @@ i est plus grand que 3, on arrête | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    secret = 42 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    print("Devine le nombre auquel je pense") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    while True: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        response = input() | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        response = int(response) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if response > secret: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            print("Trop grand") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            continue | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if response < secret: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            print("Trop petit") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            continue | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        print("Gagné") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        break | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			--- | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			À vous de jouer! | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if response == secret: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            print("Gagné") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            break | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        else: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if response > secret: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			               print("Trop grand") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if response < secret: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			               print("Trop petit") | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			--- | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -558,3 +558,23 @@ Remplacez le première ligne pour avoir: | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    secret = random.randint(0, 100) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			Le jeu devient tout de suite plus amusant :) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			(Oui, c'est un peu magique pour le moment, mais on expliquera en | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			détail comment ça marche plus tard). | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			--- | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			# Et voilà! | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      $ python 02-devine-nombre.py | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Devine le nombre auquel je pense | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      50 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Trop grand | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      25 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Trop petit | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      27 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Trop grand | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      26 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			      Gagné |