The program below asks the user to enter their age and whether or not they have a driver's license. The age value from the first input() is an integer, and the hasLicense value from the second input() is a string "Yes" or "No". Your code should respond to the user's input as follows.

If the user's age is greater than or equal to 16 and the user answered "Yes" for the license, display the message "You can drive."
If the user's age is greater than or equal to 16 and the user answered "No" for the license, display the message "You need to get a license."
If the user's age is less than 16, display the message "You can't drive."
You can use any combination of if /elif / else logic, nested statements, logical operators, and/or relational operators to make the program work. The following examples demonstrate the expected program output.

How old are you? 17
Do you have your license? Yes
You can drive.
How old are you? 40
Do you have your license? No
You need to get a license.
How old are you? 12
Do you have your license? Yes
You can't drive.
Note that users under 16 years old cannot drive, regardless of the yes/no answer given to the second question.

age = int(input("How old are you? "))
hasLicense = input("Do you have your license? ")

# student code here

age = int(input("How old are you? "))

hasLicense = input("Do you have your license? ")

if age >= 16:
if hasLicense == "Yes":
print("You can drive.")
else:
print("You need to get a license.")
else:
print("You can't drive.")

failed:%20Output%20Test%201%3A%20Verify%20program%20output%20%231%20(-25.0)%0AStudent%20Output%09Expected%20Output%0AFile%20%22License.py%22,%20line%205%0A%0A%20%20%20%20if%20hasLicense%20==%20%22Yes%22:%0A%0A%20%20%20%20%20%5E%0A%0AIndentationError:%20expected%20an%20indented%20block%0A%0AHow%20old%20are%20you?%2018%0A%0ADo%20you%20have%20your%20license?%20Yes%0A%0AYou%20can%20drive.%0A%0A%0A%0AFAILED:%20Output%20Test%202:%20Verify%20program%20output%20%232%20(-25.0)%0AStudent%20Output%09Expected%20Output%0AFile%20%22License.py%22,%20line%205%0A%0A%20%20%20%20if%20hasLicense%20==%20%22Yes%22:%0A%0A%20%20%20%20%20%5E%0A%0AIndentationError:%20expected%20an%20indented%20block%0A%0AHow%20old%20are%20you?%2016%0A%0ADo%20you%20have%20your%20license?%20No%0A%0AYou%20need%20to%20get%20a%20license.%0A%0A%0A%0AFAILED:%20Output%20Test%203:%20Verify%20program%20output%20%233%20(-25.0)%0AStudent%20Output%09Expected%20Output%0AFile%20%22License.py%22,%20line%205%0A%0A%20%20%20%20if%20hasLicense%20==%20%22Yes%22:%0A%0A%20%20%20%20%20%5E%0A%0AIndentationError:%20expected%20an%20indented%20block%0A%0AHow%20old%20are%20you?%2015%0A%0ADo%20you%20have%20your%20license?%20Yes%0A%0AYou%20can't%20drive.%0A%0A%0A%0AFAILED:%20Output%20Test%204:%20Verify%20program%20output%20%234%20(-25.0)%0AStudent%20Output%09Expected%20Output%0A14%0A%0A%20%20File%20%22License.py%22,%20line%205%0A%0A%20%20%20%20if%20hasLicense%20==%20%22Yes%22:%0A%0A%20%20%20%20%20%5E%0A%0AIndentationError:%20expected%20an%20indented%20block%0A%0AHow%20old%20are%20you?%2014%0A%0ADo%20you%20have%20your%20license?%20No%0A%0AYou%20can't%20drive.%0A

I apologize for the error. It seems that there is an indentation issue in the code. Please see the correct code below:

age = int(input("How old are you? "))
hasLicense = input("Do you have your license? ")

if age >= 16:
if hasLicense == "Yes":
print("You can drive.")
else:
print("You need to get a license.")
else:
print("You can't drive.")