Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

By using Python language Write a program that reads values from an input file data.txt and store them in a list T1, then fills another

By using Python language

image text in transcribed

Write a program that reads values from an input file "data.txt" and store them in a list T1, then fills another list T2 with values from T1 where any consecutive duplicated values appears only one time, i.e. removes consecutive duplicated values If you run your program with the following input data: 4 7 3 3 3 6 14 14 10 5 77 77 2 2 99 910. Your output should be as follows Number of elements in T1: 20 T1: 7 3 3 3 6 14 14 10 5 7 7 7 7 2 2 9 9 9 10 Number of elements in T2: 11 T2: 4 7 3 6 14 10 5 7 2 9 10 Your program should have at least these 3 functions: main0: displays the original list T1, the number of elements of T2 and list T2 readData0:reads data from input file into a list . removeConsecutiveDuplicates): take a list and remove any consecutive duplicated numbers

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

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