Write program named program63py that opens a file named


Write 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.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write program named program63py that opens a file named
Reference No:- TGS02511695

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)