This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
min = 1 | |
max = 6 | |
roll_again = "yes" | |
while roll_again == "yes" or roll_again == "y" : | |
print("Rolling the dices...") | |
print("The values are...") | |
print(random.randint(min,max)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
number = random.randint(1,99) | |
guesses = 0 | |
while guesses < 5: | |
guess = int(input("Enter an integer from 1 to 99 : ")) | |
print() | |
guesses += 1 | |
print("this is your " +str(guesses) + " guess") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
random_number = random.randint(1,99) | |
print("Random number is 1 to 99") | |
number = int(input('Gussing number: ')) | |
while random_number != number : | |
print() | |
if number > random_number: | |
print("Number is High") |