#DataquestChallenge Dataquest 30 days Challenge Day 3

Day 3 - Learned about :

  • How to save values using variables
  • How to work with integers and floats
  • How to work with text data using strings
  • How to convert between different data types

So happy with knowlegde I am gaining

1 - Simple to save a value in a variable, just declare the variable and assign a value to it.
For example: number = 5

2 - To work with integers you have to give them a number without a comma.
For example: money_bank = 2000

Floats are numbers with commas
For example: pi = 3.14

3 - To work with text data, you must declare a variable and assign it a string between quote
For example: text = “dataquest is the best data learning site”

4 - We can convert an integer to a float and vice versa.
For example: pi = int (3.14). pi is now equal to 3.

To convert an integer to a float: number = 10
float = float (number)