Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python question without loops is what I am trying to understand PART 1: Dice Rolling Simulator Goal: This project involves writing a program that

Python question

without loops is what I am trying to understand

""" PART 1: Dice Rolling Simulator

Goal: This project involves writing a program that simulates the rolling of dice. When the program runs, it will randomly choose a number between 1 and 6. It will then use that number to index the LIST, and printed the result to the screen. """

import random

""" Task 1: Create a LIST of the die faces, with the variable name of mydice_list.

Example: - a die face of 1 should be represented with a single "." - a die face of 6 should be represented by "..." """

### YOUR CODE GOES HERE ###

""" Task 2: Print a random die face to the screen from mydice_list that corresponds to the value of random_dice.

random_dice: a variable that stores the value of what is returned from random.randint().

random.randint(0,5) will return a random value between 0 and 5.

Think about how you can use LIST indexes to select a value from a LIST of data """

# use random_dice value to select and print the die face to the screen # from mydice_list random_dice = random.randint(0,5)

# print the die face to the screen ### YOUR CODE GOES HERE ###

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

LO2 Identify components of workflow analysis.

Answered: 1 week ago