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????)
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?