program to convert a string into an integer number and integer into floating point number in python
Answers
Answered by
0
Answer:
use the int() function. This function takes two parameters: the initial string and the optional base to represent the data. Use the syntax print(int("STR")) to return the str as anint , or integer
Explanation:
Converting Floats to Integers
Python also has a built-in function to convert floats to integers: int() . In this case, 390.8 will be converted to 390 . When converting floats to integers with the int() function, Python cuts off the decimal and remaining numbers of a
There are two ways to convert String to Integer in Java,
String to Integer using Integer. parseInt()
String to Integer using Integer. valueOf()
hope this have helped you out
please do Mark my answer as the brainliest
and please do follow me
Similar questions