Lecture 2 - Python Functions and Working with Files

In the try and except block, can we have multiple except statement?

The reason is, let’s consider a case if I am expecting more than one runtime error, so can we have multiple except statement to handle (>1) runtime errors for each case?

1 Like

how to create a markdown cell using keyboard shoprtcuts…

What is the difference between module, library, and script ?

7 Likes

Why do I always have problems saving my notebooks. It often gets quite frustrating.

Give me a like if you’re here!

48 Likes

Excited to learn new things!

Hello World, present here!

1 Like

print (‘Welcome to python world’)

2 Likes

3 posts were split to a new topic: How to print key of a dictionary using an iterator?

Why should we use the binder since Jupyter notebook in our own machine can do better ?

2 Likes

To use the a double quote within a string written with double quotes, escape the inner quotes by prefixing them with the \ character.

I didn’t get what is the use of it mentioned in the practice section.

1 Like

binder lets you use it withouth needing to make running jupyter notebooks possible on your PC. e.g. - I cant open jupyter on my PC and am too lazy to change that, but can still run it on binder. but when you have Jupyter on your PC, you dont really need binder I suppose.

1 Like

He is teaching so beautifully!!

2 Likes

I prefer to use binder actually, because it builds a Docker image of your repository

2 Likes

Good evening sir,
Really liked your course.
can you explain difference between method and function

7 Likes

“”" a
b""" this gives a/nb

but ‘/n’ is not generated in the below case why?
“”"
Two windmills are standing in a field and one asks the other,
“What kind of music do you like?”

The other says,
“I’m a big metal fan.”
“”"

It’s \n not /n. Backward slash. Not forward one.

1 Like

10 posts were split to a new topic: How to capitalize each word in a string?

hey,
why does this bit throw an error
stream = “engineer”
print (f"Hello Iam an “{stream}”. Thank you!)

i know its the “” creating the problem but how to avoid those

Thank you

\n is an escape character. its basically a symbol which tells Python to make a new line, thus the language sees no need to animate “\n” and instead does a new line as seen in your example.