Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Python in one shot

Rating
-
Sold
-
Pages
10
Uploaded on
28-02-2023
Written in
2022/2023

Your Python notes cover a wide range of important topics that are essential for anyone looking to learn or improve their skills in this popular programming language. These topics include: Basic syntax: Your notes cover the basic syntax of Python, including data types, operators, control structures, and functions. These concepts are fundamental to understanding how Python works and how to write effective code. Object-oriented programming: Your notes cover the principles of object-oriented programming in Python, including classes, objects, inheritance, and polymorphism. These concepts are critical for writing complex applications that are easy to maintain and extend. Input/output and file handling: Your notes cover how to read input from users and files, and how to write output to the console or to files. These skills are essential for building applications that interact with the user or store data. Modules and libraries: Your notes cover how to use built-in modules and external libraries to extend the functionality of Python. This knowledge is crucial for writing efficient and powerful code that can handle complex tasks. Error handling: Your notes cover how to handle errors and exceptions in Python, which is essential for writing robust and reliable applications that can handle unexpected situations.

Show more Read less
Institution
Course

Content preview

Python in One Shot

This video has been made with a lot of love & I hope you guys have an
amazing programming journey :)

Why to Use Python?
Python can be used for :
1. Programming (for Placements/online contests/DSA)
2. Development (using a backend framework called Django)
3. Machine Learning / Data Science / Artificial Intelligence

Websites built using Python include Google, Youtube, Instagram, Netflix,
Uber & much more.

What to Install?
1. Python (https://www.python.org/)
2. PyScripter (https://rb.gy/bvnn69 )
3. PyCharm (https://www.jetbrains.com/pycharm/)

Our First Python Program
print("Hello World")

A Key Point to know about Python
• It is a case sensitive language



Variables

Basic Types in Python - numbers(integers, floating), boolean, strings

Example 1 :
name = "shradha"
age = 22
print(name)
print(age)

Example 2 :
name = "shradha"
age = 22

name = "aman"
age = 24
print(name)

, print(age)

Example 3 :
first_name = "shradha"
last_name = "khapra"
age = 19
is_adult = True

print(first_name + " " + last_name)
print(age)
print(is_adult)

> Exercise Solution
first_name = "Tony"
last_name = "Stark"
age = 52
is_genius = True


Taking Input
name = input("What is your name? ")
print("Hello " + name)
print("Welcome to our cool Python class")

> Exercise Solution
superhero = input("What is your superhero name? ")
print(superhero)

Type Conversion
old_age = input("Enter your age : ")
#new_age = old_age + 2
#print(new_age)

new_age = int(old_age) + 2
print(new_age)


#Useful converion functions
# 1. float()
# 2. bool()
# 3. str()
# 4. int()

> Code for Sum of 2 Numbers

Written for

Institution
Course

Document information

Uploaded on
February 28, 2023
Number of pages
10
Written in
2022/2023
Type
Class notes
Professor(s)
Shradha khapra
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
kasimshah1

Get to know the seller

Seller avatar
kasimshah1 Ahinsa Polytechnic
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions