Python Object and Data Structure

Numbers - FAQ
Numbers FAQ 
1. What's the difference between floating point and an integer?
An integer has no decimals in it, a floating point number can display digits past the decimal point.
2. Why doesn't 0.1+0.2-0.3 equal 0.0 ?
This has to do with floating point accuracy and computer's abilities to represent numbers in memory. For a full breakdown, check out: https://docs.python.org/2/tutorial/floatingpoint.html
Strings FAQ
1. Are strings mutable?
Strings are not mutable! (meaning you can't use indexing to change individual elements of a string)
2. How do I create comments in my code?
You can use the hashtag # to create comments in your code
Strings FAQ
1. Are strings mutable?
Strings are not mutable! (meaning you can't use indexing to change individual elements of a string)
2. How do I create comments in my code?
You can use the hashtag # to create comments in your code

Lists FAQ
1. How do I index a nested list? For example if I want to grab 2 from [1,1,[1,2]]?
You would just add another set of brackets for indexing the nested list, for example: my_list[2][1] . We'll discover later on more nested objects and you will be quizzed on them later!

https://github.com/Radhika108/pythonIntroduction/blob/master/04-Lists.ipynb
Dictionaries FAQ
1. Do dictionaries keep an order? How do I print the values of the dictionary in order?
Dictionaries are mappings and do not retain order! If you do want the capabilities of a dictionary but you would like ordering as well, check out the ordereddict object lecture later on in the course!

https://github.com/Radhika108/pythonIntroduction/blob/master/04-Lists.ipynb
Resources for More Basic Practice
Before you begin your assessment, I wanted to point out some helpful links for practice (don't worry about being able to do these exercises, I just want you to be aware of the links so you can visit them later, since we still haven't discussed functions, you won't be able to utilize a lot of these resources yet!):
Basic Practice:
http://codingbat.com/python
More Mathematical (and Harder) Practice:
https://projecteuler.net/archives
List of Practice Problems:
http://www.codeabbey.com/index/task_list


Comments

Popular posts from this blog

The Complete Guide to Vue.js User Authentication with Auth0

Load Balanced and Auto Scaling containerized app with AWS ECS

DynamoDB vs Azure Cosmos DB - The Ultimate Comparison