try:
age=int(input("...."))
except ValueError # type of error we're excluding, as an if statement
print("You have given the wrong data. Try again")
age=int(input("...."))
If an user is tipping a string, it will give a prompt to ask for the right data once again
try:
age=int(input("...."))
except ValueError # type of error we're excluding, as an if statement
print("You have given the wrong data. Try again")
age=int(input("...."))
If an user is tipping a string, it will give a prompt to ask for the right data once again
turn_left()
turn_left()
turn_left()
def jump():
if wall_on_right():
if wall_in_front():
turn_left()
elif front_is_clear():
move()
elif right_is_clear():
turn_right()
move()
while not at_goal():
jump()
turn_left()
turn_left()
turn_left()
def jump():
if wall_on_right():
if wall_in_front():
turn_left()
elif front_is_clear():
move()
elif right_is_clear():
turn_right()
move()
while not at_goal():
jump()
To make it a string:
password_string = ""
for string in password:
password_string+=string
print(password_string)
And that should make the code a string rather than a list.
To make it a string:
password_string = ""
for string in password:
password_string+=string
print(password_string)
And that should make the code a string rather than a list.