I was trying functions since im new to python.
then i ran into a error.
lol = input(“Hello!\n”)
if lol == “Hi!”:
print(“Hello Again!”)
else:
print(“Error: Syntax Unavailable.”)
it works normally but if another function is runned, it will run automatically
Like:
# — Another Function
s = input(“RUN FUNCTION?”)
if s == “Yes”:
x = 1
while 1 < 10:
print(x)
x += 1
# - Main Function
z = input(“Hello Lol\n”)
if z == “Hi!”:
print(“Hello!”)
else:
print(“Error”)
OUTPUT:
RUN FUNCTION?Yes
1
2
3
4
5
6
7
8
9
10
Error
I want the “Error” Message to respond ONLY when the Syntax is unindentified.