Subscribe this Blog

Wikipedia

Search results

Notifications and New Posts!

Monday, August 31, 2020

Google Meet Session - 31st August 2020 ADVANCED PROGRAMMING CONCEPTS - Python (TY A and B)

ADVANCED PROGRAMMING CONCEPTS - Python
Monday, 31 August11:00 – 12:00
Join with Google Meet
https://meet.google.com/uht-egpu-qtx
Description: Prof. B.S. Savase sir is not available today, Therefore, we learn python today. Subject : ADVANCED PROGRAMMING CONCEPTS - PythonTo solve assignments Please join Google Classroom.Invitation of Google Classroom has been sent to your official email id.Please accept the google classroom invitation through official email id. Or directly by entering Class code of Google Classroom also you can join Google Class room to solve assignments.Class code of Google Classroom : 3ojdsjm
With kind regards,
SD Bhosale

Organiser: Sachin Bhosale

To know your attendance : Click here


Today's Learnings:
Python literal - List
# List is a collection which is ordered and changeable.# Allows duplicate members.
# Tuple is a collection which is ordered and unchangeable.# Allows duplicate members.
# Set is a collection which is unordered and unindexed.# No duplicate members.
# Dictionary is a collection which is unordered, changeable and indexed.
# No duplicate members.
# List# A list is a collection which is ordered and changeable.
# In Python lists are written with square brackets.
# Example
# Create a List:
thislist = ["apple", "banana", "cherry"]
a=[11,5,7,9]
b=[1.5,7.5,4.4]
print("Displaying list thislist:",thislist)
print("Displaying list a:",a)
print("Displaying list b:",b)
print("Datatype of list thislist",type(thislist))
print("Datatype of list a:", type(a))
print("Datatype of list b:",type(b))
Output:
Displaying list thislist: ['apple', 'banana', 'cherry']
Displaying list a: [11, 5, 7, 9]
Displaying list b: [1.5, 7.5, 4.4]
Datatype of list thislist <class 'list'>
Datatype of list a: <class 'list'>
Datatype of list b: <class 'list'>

# Access Items# You access the list items by referring to the index number:
# Example
# Print the second item of the list:
thislist = ["apple", "banana", "cherry",1,2.4]
print("First item or data from thislist",thislist[0])
print("Second item or data from thislist",thislist[1])
print("Third item or data from thislist",thislist[2])
print("Fourth item or data from thislist",thislist[3])
print("Fifth item or data from thislist",thislist[4])

print("Datatype of First item or data from thislist",type(thislist[0]))
print("Datatype of Second item or data from thislist",type(thislist[1]))
print("Datatype of Third item or data from thislist",type(thislist[2]))
print("Datatype of Fourth item or data from thislist",type(thislist[3]))
print("Datatype of Fifth item or data from thislist",type(thislist[4]))
Output:
First item or data from thislist apple
Second item or data from thislist banana
Third item or data from thislist cherry
Fourth item or data from thislist 1
Fifth item or data from thislist 2.4
Datatype of First item or data from thislist <class 'str'>
Datatype of Second item or data from thislist <class 'str'>
Datatype of Third item or data from thislist <class 'str'>
Datatype of Fourth item or data from thislist <class 'int'>
Datatype of Fifth item or data from thislist <class 'float'>

# Negative Indexing# Negative indexing means beginning from the end, 
# -1 refers to the last item,
# -2 refers to the second last item etc.
# Example# Print the last item of the list:

thislist = ["apple", "banana", "cherry"]
print("First value from the thislist: ",thislist[-3])
print("Middle value from the thislist: ",thislist[-2])
print("Last value from the thislist: ",thislist[-1])
Output:
First value from the thislist:  apple
Middle value from the thislist:  banana
Last value from the thislist:  cherry

# Range of Indexes OR Slicing
# You can specify a range of indexes by specifying 
# where to start and where to end the range.
# When specifying a range, the return value will be 
# a new list with the specified items.# Example
# Return the third, fourth, and fifth item:
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[0:3])
a=thislist[0:100]

print("This is new list after slicing: ",a)

# Note: The search will start at index 2 (included) # and end at index 5 (not included).
# Remember that the first item has index 0.
Output:
['apple', 'banana', 'cherry']
This is new list after slicing:  ['apple', 'banana', 'cherry', 'orange', 'kiwi', 'melon', 'mango']

# By leaving out the start value, the range will start at the first item:
# Example
# This example returns the items from the beginning to "orange":
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[:4])
Output:
['apple', 'banana', 'cherry', 'orange']

# By leaving out the end value, 
# the range will go on to the end of the list:
# Example
# This example returns the items 
# from "cherry" and to the end:
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[2:])
Output:
['cherry', 'orange', 'kiwi', 'melon', 'mango']

# Range of Negative Indexes
# Specify negative indexes if you want# to start the search from the end of the list:
# Example# This example returns the items
# from index -4 (included) to index -1 (excluded)
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[-4:])
Output:
['orange', 'kiwi', 'melon', 'mango']

Google Meet Session Video:



Saturday, August 29, 2020

Google Meet Session - 29th August 2020 ADVANCED PROGRAMMING CONCEPTS - Python (TY A and B)

ADVANCED PROGRAMMING CONCEPTS - Python
Saturday, 29 August16:00 – 17:00
Weekly on Saturday, until 30 Nov 2020
Join with Google Meet
https://meet.google.com/fza-dxad-utd
Description: Subject : ADVANCED PROGRAMMING CONCEPTS - Python To solve assignments Please join Google Classroom. Invitation of Google Classroom has been sent to your official email id. Please accept the google classroom invitation through official email id. Or directly by entering Class code of Google Classroom also you can join Google Class room to solve assignments. Class code of Google Classroom : 3ojdsjm With kind regards, SD Bhosale
  1. 5 minutes before

Organiser: Sachin Bhosale


To know attendance : Click here

Reference : https://www.w3schools.com/python/
Today's Learnings:
Unit No. 2 has been started.
python literal - Variables

#docstring gets executed by python interpreter
a=""" 
Welcome to
SVERI Pandharpur
"""
print(a)
Output:

Welcome to
SVERI Pandharpur

# Python Variables# Creating Variables# Variables are containers 
for storing data values.# Python has no command for declaring a 
variable.
# Example

x = str(5.0)
y = 'Rahul'print("Value of x=",x)
print(y)
print("Datatype of the variable x:",type(x))
print("Datatype of the variable y:",type(y))
print(y+x)
Output:

Value of x= 5.0
Rahul
Datatype of the variable x: <class 'str'>
Datatype of the variable y: <class 'str'>
Rahul5.0

# Variables do not need to be declared with any particular# type and 
can even change type after they have been set.
# Example
x = 4 
# x is of type int
print(x,type(x))
x = "SVERI Pandharpur" 
# x is now of type str
print(x,type(x))
Output:
4 <class 'int'>
SVERI Pandharpur <class 'str'>

"""String variables can be declared either by using single or 
double quotes:
Example"""
x = "SVERI"
print("x=",x)
# is the same as
y = 'SVERI'
print('y=',y)
Output:
x= SVERI
y= SVERI

# Variable Names# A variable can have a short name (like x and y)
 or a more 
descriptive name (age, carname, total_volume).# Rules for Python 
variables:# A variable name must start with a letter or the under
score 
character# A variable name cannot start with a number# A variable
 name can only contain alpha-numeric characters 
and underscores (A-z, 0-9, and _ )# Variable names are 
case-sensitive (age, Age and AGE are 
three different variables)
#Legal variable names:
# myvar = "SVERI"
# my_var = "SVERI"
# _my_var = "SVERI"
# myVar = "SVERI"
# MYVAR = "SVERI"
# myvar2 = "SVERI"
#Illegal variable names:
#2myvar = "SVERI"
my-var = "SVERI"
#my var = "SVERI"

# Assign Value to Multiple Variables# Python allows you to assign 
values to multiple# variables in one line:# Example
x, z, y, p = "Orange", "Banana", "Cherry",4
print("x=",x)
print("y=",y)
print("z=",z)
print("p=",p)
x="chiku"print("x=",x)
Output:
x= Orange
y= Cherry
z= Banana
p= 4
x= chiku

# And you can assign the same value to multiple variables in 
one line:# Example
x = y = z = p= "Orange"
#x,y,z="orange"        this is wrong!
print("x=",x)
print("y=",y)
print("z=",z)
print("p=",p)
x= Orange
y= Orange
z= Orange
p= Orange

x = "awesome"
print("Python is " + x)

Python is awesome

# You can also use the + character to add a variable to another 
variable:# Example

x ,y= "Python is ","awesome!"
z =  x + y
print(z)
Output:
Python is awesome!

# For numbers, the + character works as a mathematical operator:
# Example
x = '5'y = '10'
print(type(x + y))


x = 50
y = 1.0
print(type(x + y))
Output:
<class 'str'>
<class 'float'>

# If you try to combine a string and a number, Python will give you an 
error:# Example
x = 5
y = "John"
print(x + y)
Output:
Traceback (most recent call last):
  File "C:/Users/Hp/PycharmProjects/python_variable_1/10.py", line 5, in <module>
    print(x + y)
TypeError: unsupported operand type(s) for +: 'int' and 'str'

# Global Variables# Variables that are created outside of a function 
(as in all of the examples above)# are known as global variables.# Global variables can be used by everyone, both inside of 
functions and outside.# Example# Create a variable outside of a function, and use it inside 
the function

x = "awesome"
def myfunc():
  x='No. 1'  print("Python is " + x)

myfunc()

def fun():
  print("SVERI is " + x)

fun()

print("Value of x=",x)
Output:
Python is No. 1
SVERI is awesome
Value of x= awesome


x = "awesome"def myfunc():
  x = "fantastic"  print("Python is " + x)


#print("Python is " + x)
myfunc()

def fun():
  print("Python is " + x)
fun()
Output:
Python is fantastic
Python is awesome


def myfunc():
  global x
  x = "fantastic"
myfunc()

print("Python is " + x)
Output:
Python is fantastic

# Also, use the global keyword if you want to change a global 
variable inside a function.# Example# To change the value of 
a global variable inside a function, 
refer to the variable# by using the global keyword:

x = "awesome"
def myfunc():
  global x
  x = "fantastic"
myfunc()
print("Python is " + x)
Output:
Python is fantastic


Google Meet Session Video:



Friday, August 28, 2020

Google Meet Session for BE ENTC Students - Pseudocode Round

I got an opportunity to interact with BE ENTC Students.
Google Meet Session for BE ENTC Students - Pseudocode Round
26th August 2020
Great Learning for me along with students.
#sdbhosale



Google Meet Session for BE ENTC Students - Pseudocode Round 26th August 2020




Google Meet Session for BE ENTC Students - Pseudocode Round 27th August 2020


Thursday, August 27, 2020

Google Meet Session - 27th August 2020 ADVANCED PROGRAMMING CONCEPTS - Python (TY A and B)

ADVANCED PROGRAMMING CONCEPTS - Python
Thursday, 27 August15:00 – 16:00
Weekly on Thursday, until 30 Nov 2020
Join with Google Meet
https://meet.google.com/hid-dmnv-qxw
Join by phone


    Description:Subject : ADVANCED PROGRAMMING CONCEPTS - Python To solve assignments Please join Google Classroom. Invitation of Google Classroom has been sent to your official email id. Please accept the google classroom invitation through official email id. Or directly by entering Class code of Google Classroom also you can join Google Class room to solve assignments. Class code of Google Classroom : 3ojdsjm

    With kind regards,

    #sdbhosale

    Thursday, August 20, 2020

    Google Meet Session - 20th August 2020 ADVANCED PROGRAMMING CONCEPTS - Python (TY A and B)

    ADVANCED PROGRAMMING CONCEPTS - Python
    Thursday, 20 August13:30 – 15:30
    Weekly on Thursday, until 30 Nov 2020
    Join with Google Meet
    https://meet.google.com/hid-dmnv-qxw
    Join by phone

    Description:Subject : ADVANCED PROGRAMMING CONCEPTS - Python To solve assignments Please join Google Classroom. Invitation of Google Classroom has been sent to your official email id. Please accept the google classroom invitation through official email id. Or directly by entering Class code of Google Classroom also you can join Google Class room to solve assignments. Class code of Google Classroom : 3ojdsjm With kind regards, SD Bhosale


    To know attendance : Click here

    Reference : https://www.w3schools.com/python/

    Today's Learnings:
    import math
    radius = float(input("Enter the radius of the circle : "))
    circumference = 2 * math.pi * radius
    print("Circumference of the circle is : %.1f" % circumference)
    
    #following statement gives error:
    #print("Circumference of the circle is : %.2f", % circumference)
    print("Circumference of the circle is : " , circumference)
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/1.py
    Enter the radius of the circle : 1
    Circumference of the circle is : 6.3
    Circumference of the circle is :  6.283185307179586
    --------------
    #String
    #stud_name="Rahul"print("Please enter name of the student:",end=' ')
    stud_name=input("")
    print("Name of the student: ",stud_name)
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/3.py
    Please enter name of the student: Rahul
    Name of the student:  Rahul
    -------------
    stud_name=input("Please enter name of the student:")
    print("Name of the student: ",stud_name)
    #string is collection or group of characters
    #string is 1D character arrayprint(stud_name[0])
    print(stud_name[1])
    print(stud_name[2])
    print(stud_name[3])
    print(stud_name[4])
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/4.py
    Please enter name of the student:Rahul
    Name of the student:  Rahul
    R
    a
    h
    u
    l
    ----------
    #Stringuser_name=input("Please enter username:")
    print("User Name of the student: ",user_name)
    #string is collection or group of characters#string is 1D character array
    domain="@coep.sveri.ac.in"
    print("Official Email Id: ",user_name+domain)
    fn=input("Please enter first name of the student:")
    mn=input("Please enter middle name of the student:")
    ln=input("Please enter last name of the student:")
    print("Full Name of the student: ",fn+' '+mn+' '+ln)
    print("Full Name of the student: ",ln+' '+fn+' '+mn)
    print("Total Number of characters in the first name:",len(fn))
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/5.py
    Please enter username:rahulgshinde
    User Name of the student:  rahulgshinde
    Official Email Id:  rahulgshinde@coep.sveri.ac.in
    Please enter first name of the student:Rahul
    Please enter middle name of the student:Ganesh
    Please enter last name of the student:Shinde
    Full Name of the student:  Rahul Ganesh Shinde
    Full Name of the student:  Shinde Rahul Ganesh
    Total Number of characters in the first name: 5
    -----------
    print(help())
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/6.py

    Welcome to Python 3.8's help utility!

    If this is your first time using Python, you should definitely check out
    the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.

    Enter the name of any module, keyword, or topic to get help on writing
    Python programs and using Python modules.  To quit this help utility and
    return to the interpreter, just type "quit".

    To get a list of available modules, keywords, symbols, or topics, type
    "modules", "keywords", "symbols", or "topics".  Each module also comes
    with a one-line summary of what it does; to list the modules whose name
    or summary contain a given string such as "spam", type "modules spam".

    help> topics

    Here is a list of available topics.  Enter any topic name to get more help.

    ASSERTION           DELETION            LOOPING             SHIFTING
    ASSIGNMENT          DICTIONARIES        MAPPINGMETHODS      SLICINGS
    ATTRIBUTEMETHODS    DICTIONARYLITERALS  MAPPINGS            SPECIALATTRIBUTES
    ATTRIBUTES          DYNAMICFEATURES     METHODS             SPECIALIDENTIFIERS
    AUGMENTEDASSIGNMENT ELLIPSIS            MODULES             SPECIALMETHODS
    BASICMETHODS        EXCEPTIONS          NAMESPACES          STRINGMETHODS
    BINARY              EXECUTION           NONE                STRINGS
    BITWISE             EXPRESSIONS         NUMBERMETHODS       SUBSCRIPTS
    BOOLEAN             FLOAT               NUMBERS             TRACEBACKS
    CALLABLEMETHODS     FORMATTING          OBJECTS             TRUTHVALUE
    CALLS               FRAMEOBJECTS        OPERATORS           TUPLELITERALS
    CLASSES             FRAMES              PACKAGES            TUPLES
    CODEOBJECTS         FUNCTIONS           POWER               TYPEOBJECTS
    COMPARISON          IDENTIFIERS         PRECEDENCE          TYPES
    COMPLEX             IMPORTING           PRIVATENAMES        UNARY
    CONDITIONAL         INTEGER             RETURNING           UNICODE
    CONTEXTMANAGERS     LISTLITERALS        SCOPING           
    CONVERSIONS         LISTS               SEQUENCEMETHODS   
    DEBUGGING           LITERALS            SEQUENCES         

    help>

    ----------------
    a=10b=10print("Value of a=",a)
    print("Value of b=",b)
    print("Address of variable a=",id(a))
    print("Address of variable b=",id(b))
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/7.py
    Value of a= 10
    Value of b= 10
    Address of variable a= 140713081640896
    Address of variable b= 140713081640896
    ---------------
    a=10b=20print("Value of a=",a)
    print("Value of b=",b)
    print("Address of variable a=",id(a))
    print("Address of variable b=",id(b))
    
    print(id(a))
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/7.py
    Value of a= 10
    Value of b= 20
    Address of variable a= 140713081640896
    Address of variable b= 140713081641216
    140713081640896
    ---------------
    x=1
    y=2.8
    z=3+1j
    #3+1i
    #i = squareroot of -1
    #To display type of value on the output console
    p=int(y)
    q=float(x)
    print("Type of variable x=",type(x))
    print("Type of variable y=",type(y))
    print("Type of variable z=",type(z))
    
    print("Value of p=",p)
    print("Value of q=",q)
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/8.py
    Type of variable x= <class 'int'>
    Type of variable y= <class 'float'>
    Type of variable z= <class 'complex'>
    Value of p= 2
    Value of q= 1.0
    -----------------------
    String="SVERI Pandharpur "
    print(String[0:2])
    print("String in Reverse Order=",String[::-1])
    print("String:",String[0:])
    print("String:",String[0:1])
    print("String:",String[0:2])
    print("String:",String[0:5])
    print("String:",String[1:5])
    print("String:",String[3:5])
    print("String:",String[-1])
    print("String:",String[-2])
    print("String:",String[-3])
    print("String:",String[-1])
    
    #ctrl+forwardslash
    print("String:",String[:-1])
    print("String:",String[-17:-1])
    print("String:",String[-17:])
    Output:
    C:\Users\Hp\PycharmProjects\tyab\venv\Scripts\python.exe C:/Users/Hp/PycharmProjects/tyab/9.py
    SV
    String in Reverse Order=  ruprahdnaP IREVS
    String: SVERI Pandharpur
    String: S
    String: SV
    String: SVERI
    String: VERI
    String: RI
    String:
    String: r
    String: u
    String:
    String: SVERI Pandharpur
    String: SVERI Pandharpur
    String: SVERI Pandharpur
    ---------------
    Google Meet Video Session: