Skip to main content

Learn Python

 

Python 


what is data type ?

 to declaring of a variable is called data type 
another words to declare the data what type of the data it is !

data types ?

Text Type:str
Numeric Types:intfloatcomplex
Sequence Types:listtuplerange
Mapping Type:dict
Set Types:setfrozenset
Boolean Type:bool
Binary Types:bytesbytearraymemoryview
None Type:NoneType

                                                  more


CODE FOR LIST SLICING:
------------
word=input('what is word?:')
print(word[1::2])
------
input: rhaajrui
output :HARI
---------------
where 1=index of word 
2= after second letter will be print at everytime

SECOND ONE 

word='rhaajrui'
print(word[1::2])

output:hari


CODE FOR REVERSING OF A STRING:
 ----------------
word=input('what is word?:')
print(word[::-1])
 
------
input: IRAH
output :HARI
---------------
CODE FOR  STRING FORMAT:
name='krishna'
age='18'
sex= 'male'

print(f'the age of {name} is {age} and he is {sex}')

OUTPUT:   the age of krishna is 18 and he is male

SECOND ONE 

 name='krishna'
age='18'
sex= 'male'
print(name ,age ,sex)
print(f'the age of {name} is {age} and he is {sex}')
print('the age of '+name+' is '+age+' and he is '+sex)

OUTPUT:
krishna 18 male
the age of krishna is 18 and he is male
the age of krishna is 18 and he is male
-------------------------



Comments

Popular posts from this blog

OBJECT ORIENTED SOFTWARE ENGINEERING

OBJECT ORIENTED SOFTWARE ENGINEERING OBJECT ORIENTED SOFTWARE ENGINEERING TEXT BOOK :   DOWNLOAD  OBJECT ORIENTED SOFTWARE ENGINEERING TEXT BOOK :   DOWNLOAD  

MICRO PROCESSORS

  MICRO PROCESSORS MICRO PROCESSORS  & INTERFACING TEXT BOOK :   DOWNLOAD  ADVANCED MICRO PROCESSORS  TEXT BOOK :   DOWNLOAD INTEL MICRO PROCESSORS  TEXT BOOK :   DOWNLOAD MICRO PROCESSORS NOTES PDF  :   DOWNLOAD Introduction to Microprocessors Definition:  Microprocessor is the controlling unit or CPU of a microcomputer, fabricated on a very small chip capable of performing ALU operations and communicating with the external devices connected to it. A microprocessor is a  programmable electronics chip  that has computing and decision making capabilities similar to central processing unit of a computer(CPU). Any microprocessor- based systems having limited number of resources are called microcomputers. What is microprocessor and microcontroller? Microprocessor...

DAA

    DESIGN ANALYSIS & ALGORITHMS    DAA  ZOOM CLASS 21/06/2021 MONDAY TODAY TOPICS  1.Computing a Binomial Coefficient CLICK TO OPEN What is Binomial Theorem ? Binomial Theorem  is also called as  Binomial Expansion  delineat the powers in algebric equations. Binomial Theorem helps us to find the expanded the expanded polynomial without multiplying the bunch of binomials at a time. The expanded polynomial will always contain one more than the power you are expanding.    ALGORITHM  Binomial(n, k)  //Computes C(n, k)by the dynamic programming algorithm  //Input: A pair of nonnegative integers n ": k ": 0  //Output: The value of C(n, k)  for  i <--- 0  to  n  do   for  j <--- 0  to  min(i, k)  do   if  j = 0  or  j = i  C[i, j] <---1  else  C[i, J] <--- C[i -1, j -1] + C[i -1, j]  return  C[n, k]  Bino...

ENVRONMENTAL STUDIES

ENVRONMENTAL  STUDIES        THIS BLOG IS ABOUT ENVRONMENTAL STUDIES        MOSTLY  YOU  PREFERED GOOGLE CHROME TO OPEN THIS FILES                                       ES IMPORTANT QUESTIONS     :-   DOWNLOAD HERE                    1.   INTRODUCTION  :-   DOWNLOAD HERE   2. ECOSYSTEM :-   DOWNLOAD HERE       3. ENVIRONMENTAL AND NATURAL RESOURCES MANAGEMENT        DOWNLOAD HERE       4. BIO-DIVERSITY AND ITS CONVERSATION  :-  DOWNLOAD HERE   5. ENVIRONMENTAL POLLUTION LOCAL AND GLOBAL  ISSUES   :-   DOWNLOAD HERE     {PART 1 } :-   DOWNLOAD HERE    {PART 2 } :-   DOWNLOAD HERE     { PART 3 }   6. ENVI...

DATA WAREHOUSING & DATA MINING

  DATA WAREHOUSING & DATA MINING DATA WAREHOUSING & DATA MINING : DOWNLOAD HERE DATA WAREHOUSING & DATA MINING :  DOWNLOAD HERE DATA WAREHOUSING & DATA MINING  ALL NOTES:  DOWNLOAD HERE

OPERATING SYSTEMS

OPERATING SYSTEMS    OPERATING SYSTEMS  TEXT BOOK :   DOWNLOAD   OPERATING SYSTEMS TEXT BOOK :   DOWNLOAD OPERATING SYSTEMS  TEXT BOOK :   DOWNLOAD

ARTIFICIAL INTELLIGENCE

ARTIFICIAL INTELLIGENCE  ARTIFICIAL INTELLIGENCE  TEXT BOOK : DOWNLOAD HERE  ARTIFICIAL INTELLIGENCE  ALL NOTES :  DOWNLOAD HERE 

DLD

    DIGITAL LOGIC DESIGN  THIS BLOG ALL ABOUT DIGITAL LOGIC DESIGN  DLD PREVIOUS QUESTION PAPERS :-  DOWNLOAD HERE DLD  NOTES PDF  :-  DOWNLOAD HERE DLD NUMBER SYSTEM PDF  :-  DOWNLOAD HERE DLD  CHAPTHER 4 PDF      :-  DOWNLOAD HERE DLD  CHAPTHER 5  PDF    :-  DOWNLOAD HERE

E-EEE

          ELEMENTS OF ELECTRICAL ENGINEERING THIS BLOG ALL ABOUT ELEMENTS OF ELECTRICAL ENGINEERING PREVIOUS QUESTION PAPERS PDF :-  DOWNLOAD HERE 2 MID QUESTIONS WITH ANSWERS PDF :-  DOWNLOAD HERE      E-EEE   1 UNIT NOTES  PDF :-   DOWNLOAD HERE   E-EEE   DC GENERATOR NOTES  PDF :-   DOWNLOAD HERE   E-EEE  ELECTRICAL MACHINES   PDF :-   DOWNLOAD HERE E-EEE  STUDENT NOTES PDF :-     DOWNLOAD HERE   E-EEE  LECTURE NOTES  PDF :-   DOWNLOAD HERE   EXTRA MATERIAL  DC generator  A DC generator operates on the principle of Faraday's laws of electromagnetic induction. According to Faraday's law, whenever a conductor is placed in a fluctuating magnetic field (or when a conductor is moved in a magnetic field) an EMF is induced in the conductor  TYPES OF DC GENERATORS DC GENERATOR EMF EQUATION Quest...