Computers and Technology

Write a python program to do the following:
(a) use a for loop and a random integer generator to generate 10 random integers in 1 through 15. store the random integers in a tuple. display the tuple. [hint: you may want to store the random integers in a list first and then convert the list to a tuple].
(b) create a new tuple. copy the first three elements of the tuple in part (a) to this tuple. display this tuple.
(c) create a new tuple. copy the last three elements of the tuple in part (a) to this tuple. display this tuple.
(d) concatenate the two tuples in part (b) and part (c). display the concatenated tuple.
(e) sort the concatenated tuple. display the sorted tuple. the following is an example. there is no user input in this program.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:00, Disd112984
Which statement is true of web-based social media? a. they allow consumers to interact with and update content. b. they cannot be updated easily, as compared to print media. c. they are expensive to produce and maintain, as compared to print and television. d. they can exist independent of the internet.
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, HarryPotter10
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
image
Computers and Technology, 24.06.2019 09:00, lisacarter0804
Why might you chose to crest a function resume
Answers: 1
image
Computers and Technology, 24.06.2019 09:30, kyreesegordon
Retype the statements, correcting the syntax errors. system. out. println("num: " + songnum); system. out. println(int songnum); system. out. println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
Do you know the correct answer?
Write a python program to do the following:
(a) use a for loop and a random integer generator...

Questions in other subjects: