Write a program that creates a file called grades.txt

Assignment Help Programming Languages
Reference no: EM13693785

Question: Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade. the student's first name and last name for the ith line are FirstNamei and LastName. The graduating year is randomly generated as freshman, sophomore, or junior.

The grade is randomly generated from an A+ to A- for 2013, B+ to B- for 2014, or C+ to C- for 2015.

The sample output of the "grades.txt" file should look like this:

FirstName1 LastName1 2013 A-

FirstName2 LastName2 2015 C+

....

FirstName1000 LastName1000 2014 B

Please show me all the working and provide the answer.

Reference no: EM13693785

Questions Cloud

Write the equations describing the electrode reactions : Problem- Write the equations describing the electrode reactions and the net cell reaction for this electrochemical cell containing copper and silver
Occurrence of the longest substring of capital : Input a string. Output the starting position and length of the first occurrence of the longest substring of capital Xs in that string. The first letter is in position 1.
Draw a picture of the gel : Problem- The restriction enzyme, Xho1, cuts phage (lambda) DNA at position 33,498. Draw a picture of the gel you will see if it is used as the mystery enzyme in the experiment.
Calculate the ph after koh addition : Problem- A buffer is prepared from 0.25 mol benzoic acid and 0.15 mol sodium benzoate in 500 mL solution. a. What is the pH of the buffer? b. If 6.2 g of KOH are added to the buffer will the capacity be exceeded? c. Calculate the pH after KOH addi..
Write a program that creates a file called grades.txt : Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade.
Calculate the percent riboflavin in a 50 mg multivitamin : Determine the volume of Solution #2 that is needed to make 25.00 mL of 2ppm solution. Calculate the percent riboflavin (to 3 significant figures) in a 50 mg multivitamin that was dissolved in 250 mL of 0.02 M acetic acid (assume density of acetic ..
Explain why bits are not real as if you were nyquist : Explain why bits are not real as if you were Nyquist. Then Using Nyquist formula explains how to create this bits abstraction? Can you answer this question? Provide answer with example.
Explain how many kilograms of h2so4 are present : Problem- If the pH of a 1.5-in. rainfall over 1600mi2 is 3.1, how many kilograms of H2SO4 are present, assuming that it is the only acid contributing to the pH?
Program that tests if an input string is a palindrome : Write a recursive method that takes a string as argument and returns the reverse of the string (given the argument "Horse" your method should return the string "esroH").

Reviews

Write a Review

Programming Languages Questions & Answers

  Which protocol is using by video game programmers udp or tcp

What protocol do you think video game programmers would use UDP or TCP. Why do you think the game uses one or the other protocols

  1 protecting the american food supply from terrorist

1. protecting the american food supply from terrorist attacks or natural contamination is a difficult task. the fda and

  Travelling salesman problem

Travelling Salesman Problem on the L1-metric plane.

  Write function that produces a stream prime numbers

Write a function that produces a stream of positive prime numbers . Use that stream to create a list of the product of all pairs of consecutive prime numbers up to a given value.

  Program to solve roots of quadratic equation

Write down a program which solves the roots of the quadratic equation of the given form:- ax 2 + bx + c = 0. Display the results on screen.

  Application development and programming languages

Application Development and Programming Languages,  Programming languages have evolved since the First Generation Languages (1GLs) in the 1940s. The 1GLs were machine languages, which interacted directly with hardware. 2GLs were assembly languages. F..

  Computing first seven values of fibonacci number sequence

Write a program that uses a loop to compute the first seven values of the Fibonacci number sequence.

  Use one-dimensional array to read in twenty numbers

Use the one-dimensional array to solve problem: Read in 20 numbers, each of which is between 10 and 100. As each number is read, print it only if it is not duplicate of number which has already been read.

  1 microsoft is developing a new program and they want to

1. microsoft is developing a new program and they want to identify the break-even point.their fixed cost is 72000 while

  Create xml document to mark nutrition facts for cookies

Create an XML document that marks up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutritional value per serving.

  Write a program that uses is and else or if and elsif

write a program that uses is and else or if and elsif conditional statementsthat asks the user to enter a value for

  Write pseudocode to accept candy name

Write a pseudocode for the following: A programm to accept a candy name (for exmple, "chocolate-covered blueberries'), price per pound, and number of pounds sold.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd