iamhardikat11 / CP

File opened without the with statement PTC-W0010
Anti-pattern
Critical
2 years ago2 years old
Use the with statement to open a file
20    return math.ceil((area/(0.5*trianglebase)))
21
22if __name__ == '__main__':
23    fptr = open(os.environ['OUTPUT_PATH'], 'w')24
25    first_multiple_input = input().rstrip().split()
26
Use the with statement to open a file
17    # Write your code here
18     return n+1
19if __name__ == '__main__':
20    fptr = open(os.environ['OUTPUT_PATH'], 'w')21
22    t = int(input().strip())
23
Use the with statement to open a file
17    # Write your code here
18     return n+1
19if __name__ == '__main__':
20    fptr = open(os.environ['OUTPUT_PATH'], 'w')21
22    t = int(input().strip())
23
Use the with statement to open a file
17    # Write your code here
18     return n+1
19if __name__ == '__main__':
20    fptr = open(os.environ['OUTPUT_PATH'], 'w')21
22    t = int(input().strip())
23
Use the with statement to open a file
17    # Write your code here
18     return n+1
19if __name__ == '__main__':
20    fptr = open(os.environ['OUTPUT_PATH'], 'w')21
22    t = int(input().strip())
23