subject

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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
Monica and her team have implemented is successfully in an organization. what factor leads to successful is implementation? good between different departments in an organization leads to successful is implementation.
Answers: 1
You know the right answer?
Write a python program to do the following:
(a) use a for loop and a random integer generator...
Questions
question
Mathematics, 11.06.2021 01:00
question
Mathematics, 11.06.2021 01:00
question
Mathematics, 11.06.2021 01:00
question
Mathematics, 11.06.2021 01:00
Questions on the website: 13722367