try:
with open("main.py") as file:
print("File Opened")
age = int(input("Enter your age- "))
xfactor = age/10
except (ValueError, ZeroDivisionError):
print("Invalid Age")
i get an error saying
Traceback (most recent call last):
File "c:\Users\aksha\Desktop\python\main.py", line 2, in <module>
with open("main.py") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'main.py'
even though i have the file in my pc