0

How to use user input with OOP?

How would I make it so the user can input their name and age and then the program will tell them what they their name and age was. Thanks, My code: class family: def __init__(self, name, age): self.name = name self.age = age class alex(family): def talk1(self): print("Partyeeeee!") class mom(family): def talk2(self): print("Hiii") class dad(family): def talk3(self): input = input("What’s your name? ") input2 = input(int("What’s your age?")) dad = dad(input, input2) print(dad????)

26th Dec 2017, 5:29 AM
Ole113
Ole113 - avatar
1 Answer
0
Thanks @Root173, how would I make it so I could also have g ask age? I tried and got that name is required?
26th Dec 2017, 6:33 AM
Ole113
Ole113 - avatar