Question: python assist PART 2: Dice Rolling Simulator with Loops Goal: This project involves writing a program that simulates the rolling of dice using LOOPS. Using

python assist

PART 2: Dice Rolling Simulator with Loops

Goal: This project involves writing a program that simulates the rolling of dice using LOOPS. Using your experience from Part 1, and your newly learned knowledge of LOOPS, complete the following Tasks """

import random

# Create a LIST of the die faces, with the variable name # of mydice_list.

### YOUR CODE HERE ###

""" Task 1: Get input from the user by asking them how many dice they would like to roll, and store that number in a variable named how_many.

Then write a FOR loop that "rolls" how_many number of dice, printing each die face to the screen.

TIP: You are doing what you did in Part 1 how_many number of times

Example: User supplies 3. Store 3 into variable named how_many. Then output the three random die faces to the screen from mydice_list '.' '....' '..'

If user supplies 1, output should only show one random die face from mydice_list '......' """ # Task 1: for loop ### YOUR CODE HERE ###

""" Task 2: Comment out the code you typed above.

When you run the code above, your FOR loop runs and the program ends.

Using a WHILE loop, continue to ask the user for input (how many dice to roll) until they input 0. Only when the user inputs 0 should the program end.

"""

# Task 2: while loop ### YOUR CODE HERE ###

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!