subject

Write a python program to do the following: (a)use a for loop and a random integer generator to generate 5 random integers in 1 to 9. store the random integers in a list. display the list. (b)use a for loop and a random integer generator to generate 5 random integers in 2 to 8. store the random integers in a second list. display the second list. (c)use a for loop to compare elements in the two lists in pairs, i. e., compare the first elements in both lists, compare the second elements in the both lists, etc. display the larger number in each comparison. 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, 22.06.2019 11:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
question
Computers and Technology, 23.06.2019 21:50
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
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 to gen...
Questions
question
Mathematics, 16.04.2021 01:00
question
Mathematics, 16.04.2021 01:00
question
Mathematics, 16.04.2021 01:00
question
Computers and Technology, 16.04.2021 01:00
Questions on the website: 13722361