100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Class notes

marketing

Rating
-
Sold
-
Pages
20
Uploaded on
06-03-2025
Written in
2024/2025

providing depth knowledge about the python !! Please access this !! You will thank me for this !











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
March 6, 2025
Number of pages
20
Written in
2024/2025
Type
Class notes
Professor(s)
Robert
Contains
All classes

Content preview

Week 2

Lecture 2.2

Variables :-

Instructions for writing reader-friendly variables -

1. Make the variable self-explanatory.
2. Add comments.

For example :




Lecture 2.3



Dynamic Typing :-




In python, if you declare a variable as integer, it does not stay as integer ; you can
change the variable’s data type to whatever you want.

Python provides us flexibility to use variables.

,Another example of dynamic typing :-




Lecture 2.4

More on Variables, Operators and Expressions :-

In Python, there are some words like and, or, not, if, else, for, while,... which are referred
to as 'Keywords'.

We can not use these keywords as variable names.

For example :




Rules for writing variable names :-
1. Variable names can contain alphanumeric (all alphabets from A-Z in lower and
uppercase and numbers 0-9) characters and underscores.

, 2. We can start a variable name with an alphabet or an underscore but we cannot
start it with a number.
3. Variable names are case sensitive.




Even though the spellings are the same, the computer treats all three variables as
unique variables. This shows that in Python variable names are case sensitive.




Multiple Assignment :-




Note that the order matters. The following code assigns 1 to the variable x and 2 to the
variable y.
CA$7.08
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
dhruvkhanna

Get to know the seller

Seller avatar
dhruvkhanna ABM College of Health and Technology
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions