5.7 Lab 5D: Dice game

Overview

You are going to use what you learned about random number generation and simulate rolling a die for two players. Then depending on the result, print out a message indicating who won.

Objectives

to continue to use what you have learned about generating random numbers in Python
using concepts from the previous chapter, be able to take action based on a result of the program.
Description

You will first prompt for each player's name. The prompts should be "Enter name for player 1:\n " and "Enter name for player 2:\n " Once you have each player's name, roll the dice for each player. We will assume a standard 6 sided die for this game.

When you've rolled the dice, report the roll for each player, and the "winner" (the one who rolled the higher number) on two lines as follows:

For example, if the player names were "Alice" and "Bob", and the dice rolls were 5 and 3, you would print

Alice rolled a 5 and Bob rolled a 3
Alice wins!
In the case of a tie, you would print

Alice rolled a 6 and Bob rolled a 6
It's a tie!
You should not set any random seed for this program so your results will be more realistically random. Run your program several times in Develop mode to make sure you can test the first player winning, the second player winning, and a tie. It may take many attempts to generate all the possibilities.