subject
Computers and Technology, 04.06.2020 19:02 k11kiki

p25: File Write and Read1) User enters a file name (such as "myMovies. txt").2) User enters the titles of 4 of their favorite moveis (use a loop!).3) Program Writes the 4 titles to a file, one per line, then closes the file (use a loop!).4) Program Reads the 4 titles from "myMovies. txt" stores them in a list and shows the list5) The program writes the titles in reverse order into a file "reverseOrder. txt"Sample Run:Please enter a file name: myMovies. txtPlease enter a movie title #1: movie1Please enter a movie title #2: movie2Please enter a movie title #3: movie3Please enter a movie title #4: movie4Writing the 4 movie titles to file 'myMovies. txt'Reading the 4 movie titles from file into a list: [movie1, movie2, movie3, movie4]Writing the 4 movie titles in revers to 'reverseOrder. txt'Note: Do not use reverse() , reversed()Content of myMovies. txt:movie1movie2movie3movie4Content of reverseOrder. txtmovie4movie3movie2movie1

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:20
Ihave been given the number of guns per 100, and the total firearm-related deaths per 100,000. i have to find the actual number of guns per country and actual number of gun-related deaths. if somebody could show me how to do 1 question, i can finish the rest, i am just confused. tia
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 24.06.2019 00:10
Read each statement below. if the statement describes a peer-to-peer network, put a p next to it. if the statement describes a server-based network, put an s next to it. p - peer-to-peer s - server-based
Answers: 1
You know the right answer?
p25: File Write and Read1) User enters a file name (such as "myMovies. txt").2) User enters the titl...
Questions
question
Mathematics, 20.10.2020 21:01
question
Mathematics, 20.10.2020 21:01
question
Mathematics, 20.10.2020 21:01
Questions on the website: 13722360