- 2
type conversion errors
how to write the input codes
2 Réponses
+ 4
First you take input:
put = input()
(It is a string)
You can convert it to other datatypes using the class name of the datatype you want the input to be converted.
float(put) #Converts input to float if input is valid.
int(put) #Converts input to integer if input is valid.
+ 2
?