Basic types and their use in Python<\/span><\/strong><\/p>\n Just as variables are a basic concept in programming, so are the different types of values that a variable can have. We call these ‘data-types’, because they are different types of ways we can store data. <\/span><\/p>\n <\/p>\n integers <\/span><\/em><\/strong><\/p>\n Integers are numeric values from negative infinity to infinity, such as 1, 0, -5, etc. and can be stored, manipulated, and expressed inside variables without quotes.<\/span><\/p>\n float <\/span><\/em><\/strong><\/p>\n Short for “floating point number,” any rational number, usually used with decimals such as 2.8 or 3.14159.<\/span><\/p>\n strings <\/span><\/em><\/strong><\/p>\n A set of letters, numbers, or other characters. They must be in quotes ” ” .<\/span><\/p>\n tuples <\/span><\/em><\/strong><\/p>\n A tuple is an unchangeable sequence of values. ie x=(1,2,3) parentheses makes it a tuple.<\/span><\/p>\n lists <\/span><\/em><\/strong><\/p>\n A list is a changeable sequence of data. ie x=[1,2,3] square bracketsmakes it a list.<\/span><\/p>\n dictionaries <\/span><\/em><\/strong><\/p>\n A type with multiple elements i.e. x = {1: ‘a’,’b’: 2,3: 3} where you address the elements with, e.g., a text. <\/span>Dictionaries contain a key and a value.<\/span><\/p>\n <\/span><\/p>\n #Mastery09<\/a><\/span><\/p>\n <\/p>\n <\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" Basic types and their use in PythonJust as variables are a basic concept in programming, so are the different types of values that a variable can have. We call these ‘data-types’, because they are different types of ways we can store data.&nbs… Continue reading