Asked by HELLOOOOOOOOOOOONURSE
Which of the following is the correct way to format a try block in Python?
(1 point)
Responses
try {
num = int(input("Enter your age: "))
except ValueError:
print("That's not a number!")
try { num = int(input("Enter your age: ")) except ValueError: print("That's not a number!")
try:
num = int(input("Enter your age: "))
except ValueError:
print("That's not a number!")
try: num = int(input("Enter your age: ")) except ValueError: print("That's not a number!")
try: num == int(input("Enter your age: "))
except ValueError: print("That's not a number!")
try: num == int(input("Enter your age: ")) except ValueError: print("That's not a number!")
try:
num = int(input("Enter your age: "))
accept ValueError:
print("That's not a number!")
(1 point)
Responses
try {
num = int(input("Enter your age: "))
except ValueError:
print("That's not a number!")
try { num = int(input("Enter your age: ")) except ValueError: print("That's not a number!")
try:
num = int(input("Enter your age: "))
except ValueError:
print("That's not a number!")
try: num = int(input("Enter your age: ")) except ValueError: print("That's not a number!")
try: num == int(input("Enter your age: "))
except ValueError: print("That's not a number!")
try: num == int(input("Enter your age: ")) except ValueError: print("That's not a number!")
try:
num = int(input("Enter your age: "))
accept ValueError:
print("That's not a number!")
Answers
There are no human answers yet.
Answered by
GPT 3.5
try:
num = int(input("Enter your age: "))
except ValueError:
print("That's not a number!")
num = int(input("Enter your age: "))
except ValueError:
print("That's not a number!")
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.