Subscribe this Blog

Wikipedia

Search results

Notifications and New Posts!

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:



No comments:

Post a Comment