Question: Here is Python Code that simulates rolling dice. The number of dice and number of sides can be entered by the user. Refer to figure

  1. Here is Python Code that simulates rolling dice. The number of dice and number of sides can be entered by the user. Here is Python Code that simulates rolling dice.

Refer to figure 2-13 in the textbook, then on this sheet of paper draw out the flow diagram for the above code.

Here is Python Code that simulates rolling dice.

#!/bin/python3 #Author: Philip Braker #Name: Dice Roll import random numdice = int(input ("How many dice do you want to roll: ")) sidesdice int(input ("How many sides are on the dice? ")) for i in range (numdice) : print (random.randint (1, sidesdice)) Start name - True True print("Who are you?') nane - input() False continue -True- name! Joe False print('Hello, Joe. What is the password? (It is a fish.)') password - input() False password = 'swordfish break True print("Access Granted.') End Figure 2-13. A flowchart for swordfish.py. The X path will

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!