0

a=" ". while len(a) == 0. a= input(" what is numer"). how iI get the input as integer???

int,integer,python,input,while loop

26th Oct 2022, 11:42 AM
Damsara Welivita
Damsara Welivita - avatar
2 Answers
+ 3
int('2') returns integer 2 from string 2. so same way, apply int( input() )
26th Oct 2022, 11:52 AM
Jayakrishna 🇼🇳
+ 4
Please DO NOT PASTE CODE INTO THE TITLE SECTION. It hardly readable and the indentation gets messed up.
26th Oct 2022, 12:16 PM
Lisa
Lisa - avatar