02-06-2019, 02:50 AM
(02-06-2019, 02:26 AM)bitsnpcs link Wrote: Hello teage,
it can be used apostrophes where the integer is to print within a string using the speech marks " "
There is an example hereĀ https://www.programiz.com/python-program...ilt-in/int
So its a string that can be added, multiplied, divided etc?
example 1 of the url shows,
# integer
print("int(123) is:", int(123))
# float
print("int(123.23) is:", int(123.23))
# string
print("int('123') is:", int('123'))
so then I experiment with this,
>>> int('2')+int('2')
4
>>> int("2")+int("2")
4
>>> int(2)+int(2)
4
forgive me if my questions seem a bit silly, im just trying to wrap my head around it. :o