Strings are surrounded by quotes. If anything has quotes surrounding it, it’s a string. For example:
x = '5'might make you believe that x equals to 5, but it isn’t. If you were to reference it, the code would treat it as a string and not a number, so you wouldn’t be able to add it or do any types of math.
# strings x = '5' y = '6' print(x + y) # this is 56 (concatentation) # integers a = 5 b = 6 print(a + b) # this is 11 (addition)
View code on GitHub.
Practice: Come up with 3 examples each of floating numbers, integers, and strings and print them.