Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
3

Ask Age

CassioTDS
CassioTDS

I Need To Ask The Player Age But He Only can put numbers.

4 years ago
You are viewing a single comment. View All
3
ash15khng
ash15khng

@Four_Of_Clubs There is no type() function in Python if I'm not wrong.
You could use a try except loop, something like this:

try: age = int(input("what is your age?")) except ValueError: print("invalid number")
4 years ago