I am building a simple program to pre-screen tenants for my rental properties. The program asks them a series of questions - some of which require a "yes" or "no" answer which would be a boolean (true/false).
The problem is, no matter what you answer for the boolean inputs it records as "1".
I'm using sqlite3 locally to store the data, here's the code:
def enter_dynamic_data():
fname = input("First Name? ")
lname = input("Last Name? ")
email = input("Email? ")
phone = input("Phone? ")
criminal = bool(input("Have you ever been convicted of a crime? "))
evicted = bool(input("Have you ever been evicted? "))
income = bool(input("Do you have verifiable income of at least 3x the rent amount? "))
ref = bool(input("Do you have good rental references? "))
c.execute("INSERT INTO tenant_screening (firstname, lastname, email, phone, criminal, evicted, income, ref) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", (fname, lname, email, phone, criminal, evicted, income, ref))