Python Program - Convert String to Integer
by matt392 in Circuits > Software
85 Views, 1 Favorites, 0 Comments
Python Program - Convert String to Integer




# Program that will convert string to integer
print ("This program will convert a string to an integer.")
enteredstring = input("Please enter a number to be converted: ")
convertedstring = int(enteredstring)
print ("The string that was converted to an integer is:", convertedstring)
print ("The variable type of \"convertedstring\" is:", type(convertedstring) )