Sollicitatievraag bij Capgemini

Write a function to typecaste float to int

Antwoord op sollicitatievraag

Anoniem

12 jun 2021

num=9.3 print('type:',type(num).__name__) num=int(num) print('convert value :',num,'type:',type(num).__name__) Output: type: float convert value : 9 type: int

1