from microbit import *
 
fw = open("storm.txt","w")
fw.write("hello world\n")
fw.write("here is more data\n")
fw.write("line 3\n")
fw.close()
 
eof = False
fr = open("storm.txt", "r")
while eof == False:
    s = fr.read()
    print(s)
    if s == "":
        eof = True
fr.close()    
print("file successfully read")