Variables, Operators, and Data Types
External Resources
- Solving LeetCode Problems - https://jovian.com/learn/introduction-to-programming-with-python/knowledge/07-solving-leetcode-problems-209
- Python Programming Practice - https://www.codewars.com/?language=python
- Python Tutorial at W3Schools - https://www.w3schools.com/python/
- Practical Python Programming - https://dabeaz-course.github.io/practical-python/Notes/Contents.html
- Python official documentation - https://docs.python.org/3/tutorial/index.html
- More Markdown syntax - https://learnxinyminutes.com/docs/markdown/
- More string methods - https://www.w3schools.com/python/python_ref_string.asp
- More list operations - https://www.w3schools.com/python/python_ref_list.asp
- More dictionary methods - https://www.w3schools.com/python/python_ref_dictionary.asp
- Crash course on Introduction to Python - https://nostarch.com/pythoncrashcourse2e
Common Questions
Q1: How do you delete cells in the notebook?
A: There are two ways to delete cells in a notebook-
-
Select the cell you want to delete, press
ESCand pressDtwice. -
Select the cell you want to delete, go to
Editon Menu bar and click on Delete cells.
Q2: How can I display an image within a markdown cell in a notebook?
A: You have to upload the image to https://imgur.com/ then hover over the image, right click on mouse, choose copy link address and paste that link in the syntax.
For example -

Q3: I added an image from my computer in my notebook and it's not showing on Jovian. What to do?
A: You have to upload the image to https://imgur.com/ then copy the link address and use that link in the syntax for the image to show on your notebook. Images on your computer and Google Drive(Private) will not be displayed.
Q4: Is there a way to prevent a URL in a markdown cell in Jupyter from displaying as a hyperlink?
A: You can render it as code using `URL`
Q5: What is the best way to solve indentation problems?
A: Two suggestions to solve indentation issues-
-
Type each line carefully making sure it is properly indented. Don’t copy paste code.
-
Create small functions with not more than 7-10 lines of code, so you won’t even face any indentation issues.
Q6: What does join() do?
A: The join() method takes all items in an iterable and joins them into one string.
Input:
names = ["John", "Peter", "Vicky"]
separator = '#'
x = separator.join(names)
print(x)
Output:
John#Peter#Vicky
Learn more: https://www.w3schools.com/python/ref_string_join.asp
Q7 : Can you explain the following- Input: int(True) Output: 1?
A: In Python 3.x, True and False are keywords and by default, will be equal to 1 and 0.
Q8: Difference between and and & operation?
A: and is for logical operations and & is for bit wise operations. Hence in pandas or numpy we use and. and operates on lists but not on arrays where as & operates on arrays but not on lists.
Q9: Does the order of conditions matters when we are using and or or (& or |) logical/bitwise operators?
A: Yes, the order of conditions matters.
Q10: What is the difference between lists, tuples and sets in Python?
A: Lists, tuples and sets are built-in data structures in Python.
-
List
- Ordered collection of data points in square brackets [], separated by commas.
- Can store any type any data type or combination of data types.
- Lists are mutable.
- Elements in a list need not be unique and can be repeated.
-
Tuple
- Ordered collection of data points in parenthesis (), separated by commas.
- Can store any type any data type or combination of data types.
- Tuples are immutable and it is one of the identifying features of tuples.
- Elements in a list need not be unique and can be repeated.
-
Set
- Unordered collection of data points in curly brackets {}, separated by commas.
- Sets are mutable, however, only immutable objects can be stored in it.
- Elements in a set are unique.
- As no order is associated to sets, this data type does not support slicing or indexing.
It is to be noted that as tuples are immutable, any functions that change a collection of data points such as .append(), .remove(), .pop() etc. are not applicable on tuples.
Overview: https://share.descript.com/view/44XWXPzac24
Lesson Video Section Wise Download Links
- Section 1 - https://share.descript.com/view/rrQdIbTZxYW
- Section 2 - https://share.descript.com/view/YznmuBlMr2q
- Section 3 - https://share.descript.com/view/FaXgtpw9MjP
- Section 4 - https://share.descript.com/view/RUl2wP7JxF8
Google Slides Link
- https://docs.google.com/presentation/d/1P1Q4sGqwNCpY0p1LqYLI3fYEQzat2GmOHxEDzmPmk64/edit?usp=sharing
Slido Questions Link
Kahoot Questions Link
Streaming Check List Doc