Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(5) Two random numbers The following questions use your FAU Z-number (should be 8-digits). Please follow the instructions below to generate two random integers t

image text in transcribed

image text in transcribed

(5) Two random numbers The following questions use your FAU Z-number (should be 8-digits). Please follow the instructions below to generate two random integers t and s. Denote your Z- number by If your Z-number starts with 0, truncate the leading consecutive zeros, e.g 00020202 becomes 20202, Then z = 20202 . If your Z-number does not start with 0, keep all of it. E.g. 22222222 In either case, you have a number now. First, load the random module in your code (e.g. put the following line on top of your program) import random Initialize the random seed using your z and then generate two random numbers it and s ### Replace 22222222 by your number z as described above. random.seed(22222222 # Use le13 and le14 in the following line. Do not change them t = random . randint(1e13, 1e14) # Use 1e7 and 1e8 in the following line. Do not change them s- random.randint (le7, le8) In this example, the random numbers t -45680048908090 and s-63209945 are generated. They will be used in the following questions. You will have different t and s generated depending on your Z-number. (5) Two random numbers The following questions use your FAU Z-number (should be 8-digits). Please follow the instructions below to generate two random integers t and s. Denote your Z- number by If your Z-number starts with 0, truncate the leading consecutive zeros, e.g 00020202 becomes 20202, Then z = 20202 . If your Z-number does not start with 0, keep all of it. E.g. 22222222 In either case, you have a number now. First, load the random module in your code (e.g. put the following line on top of your program) import random Initialize the random seed using your z and then generate two random numbers it and s ### Replace 22222222 by your number z as described above. random.seed(22222222 # Use le13 and le14 in the following line. Do not change them t = random . randint(1e13, 1e14) # Use 1e7 and 1e8 in the following line. Do not change them s- random.randint (le7, le8) In this example, the random numbers t -45680048908090 and s-63209945 are generated. They will be used in the following questions. You will have different t and s generated depending on your Z-number

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

More Books

Students also viewed these Databases questions

Question

6. Identify seven types of hidden histories.

Answered: 1 week ago

Question

What is the relationship between humans and nature?

Answered: 1 week ago