Question: This question covers materials up to Seminar 3 . Make use of functions, selection, and repetition structures. NO data structures like set, list, tuple, or
This question covers materials up to Seminar Make use of functions, selection, and repetition structures. NO data structures like set, list, tuple, or dictionary should be used for this question. Keep the program modular by defining other functions if necessary.
This question is divided into parts. Submit separate python codes for each part. Paste screenshot of a program executions that covers all scenarios.
a Write a Python program that allows players to play the following dice game.
i At start of the game, prompt for the following:
Two unique names representing the players
Number of rounds to play
ii In each round, player will roll the dice
iii. Player with bigger dice value wins this round
iv Display the players dice values and current score
v Repeat step ii to iv until all rounds are played
vi If there is no winner, conclude the game as a draw
Sample
Enter player name: Jack
Enter player name: Jim
No of rounds to play:
Round Jack : Jim
Current Score Jack : Jim
Round Jack : Jim
Current Score Jack : Jim
Round Jack : Jim
Current Score Jack : Jim
Jim is the winner!!
Sample
Enter player name: Jack
Enter player name: Jim
No of rounds to play:
Round Jack : Jim
Current Score Jack : Jim
Round Jack : Jim
Current Score Jack : Jim
Round Jack : Jim
Current Score Jack : Jim
Its a draw!!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
