# Dice Rolling Simulator without imports or functions
# A list representing the faces of the dice
dice_faces = [1, 2, 3, 4, 5, 6]
# Print a welcome message
print("Welcome to the Dice Rolling Simulator!")
print("This program will simulate rolling a standard 6-sided dice.")
# Start an infinite loop to keep the game running
while True:
# Ask the user to press Enter to roll the dice
print("\nPress Enter to roll the dice!")
input() # Wait for the user to press Enter
# Simulate a dice roll by randomly selecting a number from the dice faces
# Since there's no random import, we will manually choose a dice face
user_choice = int(input("Enter a number between 1 and 6 to simulate the
dice roll: "))
if user_choice < 1 or user_choice > 6:
print("Oops! You need to enter a number between 1 and 6.")
continue # If the input is invalid, we ask the user again
# Simulate the dice roll (choosing a random number from the list)
roll_result = dice_faces[user_choice - 1]
# Display the result of the dice roll
print(f"\nYou rolled a {roll_result}!")
# Ask the user if they want to play again
play_again = input("\nDo you want to roll the dice again? (y/n): ")
# If the user doesn't want to play again, exit the loop
if play_again.lower() != 'y':
print("\nThanks for playing! Goodbye!")
break # Exit the loop and end the program