Question: 3. Write a program named program63.py that: opens a file named numbers.txt in write mode. generates a random integer named file_size between 4 and 7,
3. Write a program named program63.py that: opens a file named numbers.txt in write mode. generates a random integer named file_size between 4 and 7, inclusive. writes file_size random integers to numbers.txt, but each random integer must be both between 5 and 19 inclusive and be an odd number. Duplicates are okay. each of the random numbers should be written to its own line in numbers.txt. This program is not required to generate any output to the screen. To summarize, if file_size is 6, then 6 odd numbers ranging from 5 to 19 must be written to file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
