Answered step by step
Verified Expert Solution
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
This is the instructions for part D
This is what i tried to do for part D
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) passStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started