Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Converting Data Types

+++++++++++++++++++++++++++++++++++++++++++++++
first_number = input("Input your first number:")
second_number = input("Input your second number:")

print(first_number + second_number)
++++++++++++++++++++++++++++++++++++++++++++++++++
first_number = int(input("Input your first number:"))
second_number = int(input("Input your second number:"))

print(first_number + second_number)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
my_number = 5
my_string = "5"

print(my_string + str(my_number))
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
PREVIOUS NEXT
Tagged: #Converting #Data #Types
ADD COMMENT
Topic
Name
3+3 =