Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to generate a random number You must place the statement import random at the top of your program Generate a random integer in a

How to generate a random number You must place the statement import random at the top of your program Generate a random integer in a specific range with: random.randint(s, e) # s = low value, e = high value Example: randnum = random.randint(1,6) # simulates rolling a six-sided die INF 108 Assignment # 5 Random Numbers Thought for the day Create an application that randomly prints a thought for the day. Do some online research and locate seven inspirational quotes. Here is one I found, without attribute: The happiest people dont have the best of everything, they just make the best of everything. Generate a positive integer between 1 and 7. Use if-elif-else to select the random quote If number == 1: print The happiest people dont have the best of everything, they just make the best of everything. PYTHON 2.7.13

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

Management Process

Authors: Lee Long

4th Edition

978-0201822939,0201822938

Students also viewed these Databases questions