Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am running into a problem with this code I've written. Any assistance would be helpful. Assignment instructions: write a program to read in an

I am running into a problem with this code I've written. Any assistance would be helpful.

Assignment instructions:

write a program to read in an integer from the user, and use that number as the seed value. Next, generate 139 random numbers between 3 and 145, separated by "(". Print these out in rows of 11.

Example when ran:

Please enter the seed value: 37 26(134(12(97(115(138(30(119(75(99(111( 116(39(15(26(108(22(142(76(95(113(96( 11(137(57(132(109(19(5(4(133(95(20( 60(9(85(93(138(43(8(6(58(82(61( 133(80(13(75(72(55(126(39(57(71(15( 115(117(29(145(3(71(64(25(116(36(90( 92(10(28(41(19(43(132(65(138(76(124( 9(49(142(78(37(57(31(45(112(136(141( 5(94(73(20(16(60(46(105(117(83(20( 52(26(82(14(58(63(115(130(91(143(74( 13(142(53(79(4(71(134(10(69(116(59( 88(94(55(95(32(98(127(20(117(45(25( 75(84(12(128(39(14(83( 

code:

import random

see = int(input("Please enter the seed value: "))

print(see)

random.seed(see)

for x in range (11):

rand = random.randint(3, 145)

print(rand, end="(")

if x % 1 == 11:

print()

My output:

====================YOUROUTPUT=====================

0001:Please~enter~the~seed~value:~37

0002:26(134(12(97(115(138(30(119(75(99(111(

0003:[NONE]

===================MISMATCHFOUNDONLINE0003:===================

ACTUAL:[NONE]

EXPECTED:116(39(15(26(108(22(142(76(95(113(96(

======================================================

thanks for any help.

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

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

how much duration i can keep for my intervention project

Answered: 1 week ago