SlideShare a Scribd company logo
1 of 55
Introduction to
Part 1
Administration
Fire alarm
• Fire exit to the rear of the Meeting Suite(Argyle House)/Outside the café
area(JCMB)
Toilets
• Near the building entrance(Argyle House)/Near the café area(JCMB)
Refreshments
• Reception (Argyle House)/Café(JCMB)
Structure
• Divided into two 1.5h sessions.
• 20-minute coffee break in between.
• Each session has 1h of teaching and half an hour of exercises.
• Try to follow within your notebook and run all examples shown on the
slides.
Ask!
The art and science of asking questions is the source of all knowledge.
- Thomas Berger
• Do not hesitate to ask!
• If something is not clear, stop me and ask.
• During exercises (you can also ask others).
Image by mohamed Hassan from Pixabay
Now let me ask something..
• Why do you want to learn Python/programming?
• What would you use Python for?
Failure
• Coding is all about trial and error.
• Don't be afraid of it.
• Error messages aren't scary, they are useful.
Python natalensis by A. Smith on Wikimedia Commons
History
• Started by Guido Van
Rossum as a hobby
• Now widely spread
• Open Source! Free!
• Versatile
Guido Van Rossum
by Doc Searls on
Flickr CC-BY-SA
Python today
• Developed a large and active scientific computing and data analysis
community
• Now one of the most important languages for
• Data science
• Machine learning
• General software development
• Packages: NumPy, pandas, matplotlib, SciPy, scikit-learn, statsmodels
2 Modes
1. IPython
Python can be run interactively
Used extensively in research
2. Python scripts
What if we want to run more than a few lines of code?
Then we must write text files in .py
Time for a demo..
https://www.youtube.com/watch?v=BBwEF6WBUQs
Noteable (Jupyter notebooks)
• Easy to use environment
• Web-based
• Combines both text and code
into one
• Come with a great number of
useful packages
1. Start Noteable
2. Clone GitRepo(recommended)
3. Starting a notebook
4. Toolbar
Save
New block
Cut, copy
paste
Move block
Stop
execution
Reset block
And clear output
Block type
5. Download files
6. Kernel/Restart & Clear output
7. Edit/Delete Cell
8. File/ Close & Halt
9. Create a folder 10.Rename
11. Upload files
Running blocks
• By pressing the Run button
• Shift + Enter – runs block
• Alt + Enter – creates a new block
Other operations
• File/Save and Checkpoint
• File/Revert to Checkpoint
• Tab completion
• Introspection
Let us start
If you like to follow along, you can open your own notebook. But please
try to keep up with my presentation, as you still have time for exercises
after the teaching.
Agenda
• Variables
• Types
• Arithmetic operators
• Boolean logic
• Strings
• Printing
• Exercises
Python as a calculator
• Let us calculate the distance between Edinburgh and London in km
Variables
• Great calculator but how can we make it store values?
• Do this by defining variables
• Can later be called by the variable name
• Variable names are case sensitive and unique
We can now reuse the variable mileToKm in the next block without
having to define it again!
Types
Variables actually have a type, which defines the way it is stored.
The basic types are:
Why should we care?
Image by Clker-Free-Vector-Images on Pixabay
Important lesson to remember!
We can't do arithmetic operations on variables of different types. Therefore make sure
that you are always aware of your variables types!
You can find the type of a variable using type(). For example type type(x).
Casting types
Luckily Python offers us a way of converting variables to different
types!
Casting – the operation of converting a variable to a different type
Similar methods exist for other
data types: int(), float(), str()
Quick quiz
What will be the result?
Arithmetic operations
Similar to actual Mathematics.
Order of precedence is the same as
in Mathematics.
We can also use parenthesis ()
Order precedence example
Quick quiz
vs
13 49
Comparison operators
• I.e. comparison operators
• Return Boolean values
(i.e. True or False)
• Used extensively for
conditional statements
Comparison examples
False
Logical operators
• Allows us to extend the conditional logic
• Will become essential later on
Combining both
True True
Another example
True True
That wasn't very easy to read was it?
Is there a way we can make it more readable?
True
Strings
• Powerful and flexible in Python
• Can be added
• Can be multiplied
• Can be multiple lines
Strings
Strings
These are called methods and add extra functionality to the String.
If you want to see more methods that can be applied to a string simply
type in dir('str')
Mixing up strings and numbers
Often we would need to mix up numbers and strings.
It is best to keep numbers as numbers (i.e. int or float)
and cast them to strings whenever we need them as a string.
Multiline strings
Printing
• When writing scripts, your outcomes aren't printed on the terminal.
• Thus, you must print them yourself with the print() function.
• Beware to not mix up the different type of variables!
Quick quiz
Do you see anything wrong with this block?
Another more generic way to fix it
If we comma separate statements in a print function we can
have different variables printing!
Placeholders
• A way to interleave numbers is
• Elegant and easy
• more in your notes
Commenting
• Useful when your code needs further explanation. Either for your
future self and anybody else.
• Useful when you want to remove the code from execution but not
permanently
• Comments in Python are done with #
Exercise time
Simple and fun exercises.(notebooks 0 and 1)
20-minute break afterwards.
Failure is progress!
Ask us anything. Ask among yourselves as well.

More Related Content

Similar to Introduction to Python programming 1.pptx

Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptxHaythamBarakeh1
 
Python - Introduction
Python - IntroductionPython - Introduction
Python - Introductionstn_tkiller
 
Q-Step_WS_02102019_Practical_introduction_to_Python.pptx
Q-Step_WS_02102019_Practical_introduction_to_Python.pptxQ-Step_WS_02102019_Practical_introduction_to_Python.pptx
Q-Step_WS_02102019_Practical_introduction_to_Python.pptxnyomans1
 
Q-SPractical_introduction_to_Python.pptx
Q-SPractical_introduction_to_Python.pptxQ-SPractical_introduction_to_Python.pptx
Q-SPractical_introduction_to_Python.pptxJeromeTacata3
 
Introduction about Python by JanBask Training
Introduction about Python by JanBask TrainingIntroduction about Python by JanBask Training
Introduction about Python by JanBask TrainingJanBask Training
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programmingChetan Giridhar
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1Ahmet Bulut
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptxArpittripathi45
 
Functions, List and String methods
Functions, List and String methodsFunctions, List and String methods
Functions, List and String methodsPranavSB
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python ProgrammingKamal Acharya
 
Python indroduction
Python indroductionPython indroduction
Python indroductionFEG
 
python classes in thane
python classes in thanepython classes in thane
python classes in thanefaizrashid1995
 
Tuples, Dicts and Exception Handling
Tuples, Dicts and Exception HandlingTuples, Dicts and Exception Handling
Tuples, Dicts and Exception HandlingPranavSB
 
Introduction to Python for Security Professionals
Introduction to Python for Security ProfessionalsIntroduction to Python for Security Professionals
Introduction to Python for Security ProfessionalsAndrew McNicol
 

Similar to Introduction to Python programming 1.pptx (20)

Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptx
 
Python - Introduction
Python - IntroductionPython - Introduction
Python - Introduction
 
Q-Step_WS_02102019_Practical_introduction_to_Python.pptx
Q-Step_WS_02102019_Practical_introduction_to_Python.pptxQ-Step_WS_02102019_Practical_introduction_to_Python.pptx
Q-Step_WS_02102019_Practical_introduction_to_Python.pptx
 
Q-SPractical_introduction_to_Python.pptx
Q-SPractical_introduction_to_Python.pptxQ-SPractical_introduction_to_Python.pptx
Q-SPractical_introduction_to_Python.pptx
 
Introduction about Python by JanBask Training
Introduction about Python by JanBask TrainingIntroduction about Python by JanBask Training
Introduction about Python by JanBask Training
 
Python made easy
Python made easy Python made easy
Python made easy
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
Python programming
Python programmingPython programming
Python programming
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Functions, List and String methods
Functions, List and String methodsFunctions, List and String methods
Functions, List and String methods
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
 
Python 01.pptx
Python 01.pptxPython 01.pptx
Python 01.pptx
 
Python indroduction
Python indroductionPython indroduction
Python indroduction
 
python classes in thane
python classes in thanepython classes in thane
python classes in thane
 
Tuples, Dicts and Exception Handling
Tuples, Dicts and Exception HandlingTuples, Dicts and Exception Handling
Tuples, Dicts and Exception Handling
 
Introduction to Python for Security Professionals
Introduction to Python for Security ProfessionalsIntroduction to Python for Security Professionals
Introduction to Python for Security Professionals
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 

Recently uploaded

Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 

Recently uploaded (20)

Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 

Introduction to Python programming 1.pptx

Editor's Notes

  1. - Welcome and thank you for coming - Introduction - aims: -- introduce fundamentals -- build up confidence for self-study!!! Not as scary as the real-world version - assumptions: -- basic high-school maths -- no prior experience in coding CC-BY Digital Skills Team at the University of Edinburgh www.ed.ac.uk/is/skills
  2. All of us learn through asking and being curious more of a conversation - don't hesitate to stop me and ask
  3. make notes
  4. You might fail 5 times while doing something but in the end you will understand how it works and be able to replicate it
  5. - Started by Guido Van Rossum as a hobby over the Christmas vacation. - named after Monty Python's Flying Circus - First released in 1991, loved by Unix scripters - Now transformed into the most popular interpreted language. You can build anything with it! - Facts! Python was the most used language in 2016 and still most likely is!
  6. Why choose it instead of MATLAB, R, SAS, Stata and others? - It is free and open source - Intuitive and easy to learn - Extremely versatile – examples – websites, planes, robots, data - Large and friendly community - packages Very important in industry and academia
  7. Python has 2 modes of running - IPython stands for Interactive Python Python can be interpreted – good for a calculator Live demo!
  8. - showcase power of Python - you're not expected to understand all of it
  9. We will be using Noteable, just another service Jupyter Notebooks. It is free and open source Web environment focused at Python Easy to use – nice gui and no setup required Block based. Has blocks which execute the code within it. Single type only Allows to combine text and code into same page. Helps with readability
  10. start noteable from learn - Link at the top of homepage Agree on personal data usage You don't have to share anything
  11. Probably enter myed login details Then press start on noteable homepage
  12. Start a notebook by clicking on it. Notebook 0 is an environment introduction. Skip that, open notebook 1 Make sure that everybody is ready
  13. Autosave
  14. We need to make a course folder Then rename it to Introduction to Python or whatever Then go into that folder
  15. Make sure that you are inside that folder
  16. Run button but its best with shortcut Shift + Return/Enter Alt + Return/Enter which creates a new block after the on you are currently on.
  17. Checkpoints are useful! You can download it as multiple different things: Notebook Python script pdf
  18. Let's run our first block. That's great Writing numbers is very tedious Run this in your notebooks How can we improve that?
  19. Can we save values? By defining a variable. Can have values assigned Variables must be declared and can then be called by name. Code example Check the code yourself
  20. reuse without having to type in again Note: mileToKm not defined again
  21. So far - storing values in memory; how exactly are they stored? defined by the type. Go over all types
  22. Python decides the types, why should we care? Python uses duck typing Try running the next block
  23. Explain code, run it.  we broke python. Any ideas? Don't be afraid of errors, they are invaluable we can't add up variables of different types. important to remember! always take note of what the types of your variables are! Python is helpful and gives us a hint. Can you fix this particular block?
  24. Casting – the operation of converting a variable to a different type Let's try it on the previous code snippet. Take note that this works only in a sensible way!
  25. Note of order precedence. Table doesn't show this Should be intuitive for all of you.
  26. Similar to mathematics again Will become important later on. 
  27. Note variable passing down What will the 2nd block return?
  28. how we can combine comparison operators and logical operators
  29. Another more complex example. Here we check if x is divisible by 2 and if y is divisible by 3. Can anybody guess why we are getting False?
  30. Simpler – store intermediate values Easier to read Generally advised
  31. Functionality of strings can be extended through methods should be in your notebooks but the dir() can be used on any Object/variable
  32. We need to mix numbers and strings often, ie. Whenever printing. best to keep numbers as numbers cast them to strings whenever needed.
  33. Sometimes we need strings on multiple lines. How? Two ways? One is using triple quotes """ The other one is using the new line character - \n
  34. Let's see if everybody remembers their types Is there anything wrong with this block or will it execute nicely? [issue] Any idea how we can fix it?
  35. More examples including  Exp, Octal, Hex, Etc in your notebooks
  36. You seen the # symbols in the slides. I forget what I write; need to remind my future self Programmers though it's better to write explanation in between the code Show example
  37. error checking code , don't change it