python reserved words


PYTHON RESERVED WORDS OR KEYWORDS
What do you mean reserved?
Means to be kept or set apart for some particular use or purpose.

like the same way in programming languages it contains keywords that have particular meaning and for a particular purpose.
i.e., these words represent meaning or functionality such type of words is called reserved words.

present in python 3.9 has 36 keywords, which will increase over time, with the addition of newer keywords.
They are

['False',  'None',  'True',  '__peg_parser__',  'and',  'as',  'assert',  'async',  'await',  'break',  'class',  'continue',  'def',  'del',  'elif',  'else',  'except',  'finally',  'for', 
'from',  'global',  'if',  'import',  'in',  'is', 'lambda',  'nonlocal',  'not',  'or',  'pass',  'raise',  'return',  'try', 'while',  'with',  'yield']

Note:
All the keywords are denoted with characters only i.e., in lower case letters, and only three words are started with upper capital letters they are True, False, None and instead of this if you use symbols or digits it throws an error. 

example:
a = true
print(a)
output:
Traceback (most recent call last):
  File "D:\practical\one.py", line 318, in <module>
    a = true
NameError: name 'true' is not defined

so true or false or none should be capital only ie.,
example:
a = True
print(a)
output: True
note:
Switch and do while concepts are not applicable in python.

To check the keywords
import keyword
a = keyword.kwlist
print(a)
output:
['False', 'None', 'True', '__peg_parser__',
'and','as', 'assert', 'async',
'await', 'break', 'class', 'continue',
'def', 'del', 'elif', 'else', 'except',
'finally', 'for', 'from', 'global','
'if', 'import', 'in', 'is',
'lambda', 'nonlocal', 'not', 'or',
'pass', 'raise', 'return', 'try', 'while',
'with', 'yield']

Remember that we cant use the keywords as an identifier, if you use it then it will get an error.
example:
def = "pyhton"
print(def)
Output:
    def = "pyhton"
        ^
SyntaxError: invalid syntax


note:
if you like it then comment and share it and dont forget to subscribe

Python Important Topics

The topics or questions you must know before you attend the interview
  • What is python & who is the father of python?
  • Why suddenly python became so popular?
  • Comparison of python with other languages? and example.
  • Why the name python? for python programing language.
  • Is python is a functional or OOP or scripting language?
  • Where we can use python?
  • Features of python?
  • Limitations of python?
  • Flavors of python?
  • python versions?
  • Difference between python 2x and 3x?
  • What is the identifier in python?
  • Rules to create identifiers?
  • Reserved words in python? or keywords in python?
  • What are the data types in python?
  • What is typecasting?
  • .......








note:
I will continue to add the remaining questions stay tuned...

top websites to learn programming for free

The websites are...

  • W3schools
  • Udemy
  • Tutorialspoint
  • Coursera
  • GeeksforGeeks
  • KhanAcademy
  • Codeacademy
  • Edx
  • SoloLearn
  • FreeCodeCamp
  • Treehouse
  • Youtube
  • Medium

python identifiers

Python identifiers are nothing but a name in the python program
for example to identify a thing or a person we have names same as in python it is called as identifiers.

An identifier can be a variable name or a method name or a class name.
Example:
a = 5
here 'a' which can be used to represent
where a is a name of the variable to represent the 5

Where there are some rules to define or to create identifiers they are as follows as
Rule 1:
It allows only characters (ALPHABETS) i.e., capital letters from A to Z
and small letters a to z
and digits from  0 to 9
and only one special symbol is allowed i.e.,  " _ " (underscore)
Except this if you try to enter any other symbols it will show a syntax error.
where a syntax error is the most common and basic error that occurs when the python parser is unable to understand the line of code.

Rule 2:
The identifiers should start with characters only.
and it should not start with digits 
that is we can write or start identifiers name by characters and along with that we can also use the only symbol that is (underscore _) 
Example:
NAME ="zaheer"   ✔
Name = "zaheer"    ✔
_name = "zaheer"    ✔
_NAME = "zaheer"  ✔
NAme123 = "zaheer"  ✔

But we cannot start with any symbols or digits, If we use it again it will show a syntax error.
123name = "zaheer" ❌
$name = "zaheer" ❌

note:
NAME 
Name
_name
_NAME
NAme123

all are different because python is a case-sensitive language.
that means A and a both are different.

last but not least
Rule 3:
There is no fixed length to define an identifier name  
that is example variable name can be written with any length but should be using some specific standards which can be used to understand by any other programmers and
readability of the code depends on this rule.

Hope you find useful
give a like and if you think if it is useful and also don't forget to share with your friends
If you have any doubts comment below or contact me.




What to do next after Btech



What to do after Btech? it's a scary question since it is faced by many engineering students after their final year.
There are many routes you can take after completing your B.Tech. However, with the great number of career options available, it's natural that you may feel confused about which one to choose.
Where Some of them follow their goals, Some of them blindly join with their friend's chosen paths...
Actually, Most students get into engineering without knowing what they like or what they want to do after Btech, which is why India has a huge number of BTech graduates.

These are some routes or options I mentioned below to do after BTech.

PLACEMENTS

On-campus Placements lead you directly to recruiters without a lot of effort and offer you a chance to get a job. And here it is easy to get a job with less competition


HIGHER STUDIES

Yes, in Higher studies you can do MTech programs, MS, MBA courses, INTERNSHIPS, and the last one is CERTIFICATION Courses, etc...

since it is computer science and most of them like coding, and some of them like non-coding courses
and everyone doesn't need to choose coding as a career (technical and non-technical)
there are also non-coding jobs and courses I discussed below as follows 

Technical Courses as follows as 

  • Data science
  • Machine Learning
  • IoT
  • Cybersecurity 
  • Artificial intelligence
  • Blockchain technology
  • Android development
  • Front-end development
  • back-end development
  • Full-stack developer (java, python)
  • Tech-stacks such as MERN(Mongodb, Express, React, Node.JS), MEAN(MongoDB, Express,Angular, Node.JS), MEVN(Mongodb, Express,Vue, Node.JS), LAMP(Linux, Apache, MySQL,Php)
  • Game development
  • C, C++, Python, Java, JavaScript, Php developers...
 etc.. are some of the courses.

Non-technical jobs and courses as follows as

If you feel coding is hard, and you don't like coding even though some of the technologies or roles are mentioned below..


  • Robotic process automation (RPA)
  • UI/UX Designing
  • Network Engineer
  • Database engineer
  • Business analyst
  • Software testing/Quality analyst
  • Web designer
  • Design engineer
  • Computer architect
  • DevOps
  • Technical support
  • Business Analyst
  • Market Research Analyst
  • Digital Marketing Strategist
  • Social Media Manager
  • Marketing Manager
  • Business Development Manager
  • Management Consultant
  • Advertising and media Professional
  • Investment Banker 
  • Product Manager
  • Customer relationship manager
  • product manager
  • Technical writer
  • Graphic designer
  • Sap BASIS, SD
  • Manual testing
  • and alot more...
Etc.. are some of the non-technical jobs for that it requires good analytical and problem-solving skills and spoken English, communication, listening, and creativity.

Note:
If you know the remaining courses and jobs then list them below in the comment section  It will helpful.

Like it and Share it if you feel as useful...








Design and analysis of algorithms syllabus

Design and analysis of algorithms syllabus

Course Objectives 

  •  To analyze performance of algorithms. 
  •  To choose the appropriate data structure and algorithm design method for a specified application. 
  •  To understand how the choice of data structures and algorithm design methods impacts the performance of programs.
  • To solve problems using algorithm design methods such as the greedy method, divide and conquer, dynamic programming, backtracking and branch and bound.
  • To understand the differences between tractable and intractable problems.
  • To introduce P and NP classes.

syllabus

UNIT - I 

Introduction-Algorithm definition, Algorithm Specification, Performance Analysis-Space complexity, Time complexity, Randomized Algorithms. Divide and conquer- General method, applications - Binary search, Merge sort, Quick sort, Strassen’s Matrix Multiplication. 

UNIT - II 

Disjoint set operations, union and find algorithms, AND/OR graphs, Connected Components and Spanning trees, Bi-connected components Backtracking-General method, applications, The 8-queen problem, sum of subsets problem, graph coloring, Hamiltonian cycles. 

UNIT - III 

Greedy method- General method, applications- Knapsack problem, Job sequencing with deadlines, Minimum cost spanning trees, Single source shortest path problem. 

UNIT - IV 

Dynamic Programming- General Method, applications- Chained matrix multiplication, All pairs shortest path problem, Optimal binary search trees, 0/1 knapsack problem, Reliability design, Traveling sales person problem. 

UNIT - V 

Branch and Bound- General Method, applications-0/1 Knapsack problem, LC Branch and Bound solution, FIFO Branch and Bound solution, Traveling sales person problem. NP-Hard and NP-Complete problems- Basic concepts, Non-deterministic algorithms, NP - Hard and NP- Complete classes, Cook’s theorem.

To download the materials of all units click the below links...
Material Credits - SIA publications

Unit 1 material Download

Unit 2 material Download

Unit 3 material Download
 
Unit 4 material Download

Unit 5 material Download

note: 
if you have any issues or any queries, please feel free to contact us.


Design and analysis of algorithms first unit material pdf download

Design and analysis of algorithms first unit material pdf download


 

syllabus:

UNIT - I

Introduction-Algorithm definition, Algorithm Specification, Performance Analysis-Space complexity, Time complexity, Randomized Algorithms. Divide and conquer- General method, applications - Binary search, Merge sort, Quick sort, Strassen’s Matrix Multiplication

To download this unit material Click here to download