+ 5
In python ; instead of using the #float and #int functions after reading a numeric value, can the #eval function be used ?
Eval
4 Respuestas
+ 6
Just tried it and yes, it works!
https://code.sololearn.com/cbs0fyO9Xq2d/?ref=app
+ 5
Hey there,
Please add more details and what language you are using so that I can give a better answer
_____
Eval is not actually recommended, but it should be possible.
+ 5
Edwin Pratt
Thank you
+ 4
Edwin Pratt
In python ; instead of using the #float and #int functions after reading a numeric value, can the #eval function be used? Is it more suitable for reading? because float and int are reserved for type conversion.
Exemple:
nb = eval (input ("enter a number:"))