Python 3.4 - Data Types

There are several types of data that can be stored, created, and used in Python.

The four main types of data are numbers, strings, lists, and tuples/ dictionaries.

Numbers (int, long, float, complex) - Numbers are data types and there are different types of numbers. Integers are Int and are simple numbers. Long are just long integers, Float are integers with a decimal and complex numbers are integers with an imaginary number.

https://www.youtube.com/watch?v=LXjb5vqH-MQ

Strings (a string of words or one word that is contained in double or single quotes. three quotes can print multiple lines.)

https://www.youtube.com/watch?v=SOjBjD3UJww

Lists (Another data type is list. Lists can be very useful and can be manipulated in many ways. A list is indicated with brackets [ ] filled with integers, floats, strings, etc.

https://www.youtube.com/watch?v=3-U5sY862Ag

Tuples (In Tuples you cannot change the values of the data types. The difference is you use a round bracket () instead of a square bracket []. Again you can fill the tuple with many different types of data.

https://www.youtube.com/watch?v=92osKnSgkWw

Dictionaries (A dictionary uses the {} brackets. In a dictionary you are assigning a value to each data type. For example, if the was a string in your dictionary with the name {cat: brown, dog: white} this is what it would look like. You can edit a dictionary in many ways.

https://www.youtube.com/watch?v=1pAxf6SxhbQ

Comments

Popular posts from this blog

Python 3.4 - Caesar Cipher

UML - Use Case Diagram