Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

convert string to double

# Program: Convert string to double in Python using float()

num = input("Enter a number: ")
print("The input is: ", num)

# calling float()
num = float(num)
print("num: ", num, " type: ", type(num))

# Also operating on input
print("Performing operation: ", num - 10)
Source by favtutor.com #
 
PREVIOUS NEXT
Tagged: #convert #string #double
ADD COMMENT
Topic
Name
9+9 =