Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In python, write a program that generates a random integer between 1 and 25. Each time an integer is generated, the program should add it
In python, write a program that generates a random integer between 1 and 25. Each time an integer is generated, the program should add it to list_1 using append (only if the generated integer is not already in list_1. Add until list has 10 integers. Add numbers to list_2 if they are not added to list_1. Print both lists using a for or while loop. Also, print a count of total number of integers generated.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started