Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you could please do this in python thank you in advance this is part b which i already did, but it is needed to

If you could please do this in python thank you in advance

this is part b which i already did, but it is needed to do part D

image text in transcribed

This is the instructions for part D

image text in transcribed

This is what i tried to do for part D

image text in transcribed

Please do this in python thank you :)

def part_b(): with open("b_out.txt", 'W') as f: f.write("[") for i in range(1, 1025): if i == 1024: f.write(str(i)) else: f.write(str(i)+ ', ') f.write("]") Part D Inside the main.py python script - write a function called part_d to read the file b_out.txt (created in part_b), and parse the contents to a list of integers (in sequence). Return the list of integers. def part_d(): with open("b_out.txt", 'r') as f: out - [] for line in f.readlines(): out.append(int(float(line.strip(out)))) print(out) pass

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions