Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Make a basic writing program Open the IDLE and write a program that writes what the user writes. The program should execute the following

1. Make a basic writing program

Open the IDLE and write a program that writes what the user writes. The program should execute the following tasks:

1. Ask the output file name.

2. Open that file in write mode.

3. Repeat in a loop the following operations.

4. Ask for a string to be written as a line on the file.

5. Write that line in the file.

6. If the line is equal to quit, the program should terminate and close the file.

7. Close the file.

Provide the code here:

Provide the screenshot of the run output (entire screen, no cuts).

2. Make a basic reading program

Open the IDLE and write a program that reads itself and printsthe data on the screen. Use your surname to give the name to the python program. The program should execute the following tasks:

1. Open in reading mode itself (the same python file which is being executed) as input file.

2. Read the file content and write it on the screen.

3. Close the file.

Provide the code here:

Provide the screenshot of the run output (entire screen, no cuts).

3. Make a basic Virus

Open the IDLE and write a program that behaves like a non-harmful virus. The program should execute the following tasks:

1. Open in reading mode itself (the same python file which is being executed) as input file.

2. Open in write mode another file called with the same name concatenated to the string .vir.

3. Copy the input file to the output file. Use the method you like. Remember that you must be able to read at least onemethod for the quiz and be ready to understand all methods.

4. Close the files.

Provide the code here:

Provide the screenshot of the run output (entire screen, no cuts).

4. Make a basic program to write Cartesian data on a file

Open the IDLE and write a program that asks for 10 Cartesian points (10 pairs of numbers) and saves them on a file.

Provide the code here:

Provide the screenshot of the run output (entire screen, no cuts).

5. Make a basic program to plot Cartesian data from a file

Open the IDLE and write a program that reads Cartesian points (pairs of numbers) from a file (until the file ends) and plots them on a Cartesian plane.

Provide the code here:

Provide the screenshot of the run output (entire screen, no cuts).

6. Make a basic plot program

Open the IDLE and write a program that reads data from a file and plots them using any appropriate method we studied in the lecture slides.

For example:

If you have a file with a pie chart data, then plot a pie chart.

If you have a file with bars data, plot a bars chart.

Select one between Pie, Bar, Histogram, and Scatter. Do not use Cartesian (because we already did).

Provide the code here:

Provide the screenshot of the run output (entire screen, no cuts).

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

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago