Solved the problem in %run command in Windows
Title
Question
math_marks_A = []
for line in open("Desktop\student_record.txt"):
fields = line.split(";")
region_code = fields[0]
region_code_stripped = region_code.strip()
math_mark_str = fields[5]
math_mark = float(math_mark_str)
if region_code == "A":
math_marks_A.append(math_mark)
#make sure to save this in notepad as .py file.
# Most of people make error in specifying student_record.txt folder destination.
# Execute %run Desktop\marks.py command in ipython3.
Python Parsing-data 10-11 min 10-20 sec
Answers:
Looks like you cracked the problem. Please focus on your queries or questions when posting on the forum.
I completely agree and appreciate your advice. The focus of this forum should be for posting questions.
I started this course without having any knowledge of programming. Sometimes when I get stuck even after posting a question, it takes a very long time to get an answer. So, I also think we can utilize this platform for discussion as well, at least up to a certain limit, so that those who are able to solve few issues could help others so that we can all proceed with this course smoothly.
Hope this is fine.
Login to add comment