Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I get the it to accept the input (1) and make it print the if statement

def user_input():
    user_input = input


name = input("enter your name ")
print("hello "+ name +"!")
print("welcome to gymbros press 1 to continue :")
if input == 1():
    print("this is the personal record page where you post your best lifts ")
else: 
    print("thanks for using gymbros")

####################################
Im not sure what im doing wrong it keeps giving me the, TypeError: ‘int’ object is not callable

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

input() return type is str and int is not callable.
user_input is not used
It is recommended that you learn the basic syntax of Python first

name = input("enter your name ")
print("hello", name, "!")
print("welcome to gymbros press 1 to continue :")
if input() == "1":
    print("this is the personal record page where you post your best lifts ")
else:
    print("thanks for using gymbros")

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading