Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 405 Weeks Ago, 6 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 14 Sep 2017 My Price 8.00

Introduction to Programming class

For my Introduction to Programming class, we are supposed to create a Random Number File Writer and Reader for this week. However, I've been having an insane amount of trouble with it. We are using Python.

These are the directions given to me:

"In this programming assignment, you will create two programs. One will write a set of random numbers to a file. The second will read a set of random numbers from a file, count how many were read, display the random numbers, and display the total count of random numbers.

Random Number File Writer
Create a program called randwrite.py that writes a series of random numbers to a file. Each random number is to be on a separate line and is to be in the integer number range of 1 through 999. The prgram is to request from the user how many random numbers to generate. The file that the random numbers are written to is to be calledrandnum.txt.
The user input is to be safe from crashes from invalid input. The user must enter a positive number for the quantity of random numbers to generate. If invalid input is received the user is to be given feedback and provided with the ability to enter a value again. (A positive number is not zero and not negative). The program must not crash if an error occurs during a file operation. Use exception handling.

Random Number File Writer
Create a program called randread.py that reads a series of random numbers from a file called randnum.txt, counts how many there are, displays the random numbers, and displays the count.
The output to the user is to be labeled and nicely formatted. Prior to displaying the random numbers display List of random numbers in randnum.txt: Each random number is to be displayed on a separate line. The count displayed to the user is to be preceded with Random number count:"

So far I have created a program that generates a list of random numbers, but it only accepts range(5). I don't know how to get it to accept a range input from the user. From there, I do not know how to put it into the read/write format that this requests. Any help you can offer would be amazing!

Here is a picture of the program I have so far:

 

Answers

(5)
Status NEW Posted 14 Sep 2017 08:09 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)