def convert_to_upper_case(in_name, out_name):
    in_file = open(in_name, "r")
    out_file = open(out_name, "w")

    for line in in_file:
        converted_to_upper = line.upper()

        # note: the end="" argument in the next line ensures that
        # print will not insert an extra line at the end.
        print(converted_to_upper, file=out_file, end="")

    in_file.close()
    out_file.close()

def main():
    convert_to_upper_case("hello2.txt", "hello3.txt")
    print("done converting to upper case")

main()
