Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions