Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 I have Traceback error and a type error and i dont know how to fix it
Im new to python

when i added and else statement to catch mistakes and have it return to the beginning it crashes but it works just fine without the else statement

def add():
name = str(input("What is the character name? "))
print("\nAre you sure your okay with", name, "? y/n ")
check = input().lower()
if check == "y":
if check == "n":
print("Thats okay please try again!")
print("Sorry I don't understand!")
Quote:I have Traceback error and a type error and i dont know how to fix it
then post the error unmodified and complete.

Also, use code tags see BBcode
figured it out thanks though

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Python Type error! SamAnw 4 101 Feb-14-2020, 03:46 PM
Last Post: buran
  Type hinting - return type based on parameter micseydel 2 116 Jan-14-2020, 01:20 AM
Last Post: micseydel
  how can i handle "expected a character " type error , when I input no character vivekagrey 2 149 Jan-05-2020, 11:50 AM
Last Post: vivekagrey
  ERROR:haproxystats:Error fetching stats deepakkr3110 1 123 Nov-12-2019, 12:29 PM
Last Post: Larz60+
Exclamation Get syntax error. Dont understand why beLIEve 21 1,430 Aug-25-2019, 02:28 PM
Last Post: ThomasL
  Type Error: bad operand type for unary +: 'str' Psypher1 2 2,207 Aug-12-2019, 02:30 PM
Last Post: Psypher1
  catch input type error mcmxl22 5 360 Aug-11-2019, 07:33 AM
Last Post: wavic
  Error :unable to detect undefined names created in spyder ide error at line 2 milind_eac 2 754 Jul-30-2019, 10:29 PM
Last Post: milind_eac
  Type error: dump() missing 1 required positional argument: fp jaycuff13 2 2,369 Jul-13-2019, 10:21 AM
Last Post: jaycuff13
  Type error when reading in different data types on an __init__ method Dylanmull 3 406 May-09-2019, 02:05 PM
Last Post: buran

Forum Jump:

Users browsing this thread: 1 Guest(s)