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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!