*
myList = [1, 2, 3, 4, 2, 2, 3, 1, 4, 4, 4,5,5,6,7,6,5]
A) Write a program to get the value that appears more number of times
B) When there is a tie, then get the number which is the smallest of them
#python #practiceCode #samples #interviewQuestions #numbers #list
myList = [1, 2, 3, 4, 2, 2, 3, 1, 4, 4, 4,5,5,6,7,6,5]
A) Write a program to get the value that appears more number of times
B) When there is a tie, then get the number which is the smallest of them
#python #practiceCode #samples #interviewQuestions #numbers #list
*
name = 'ppy!'
Write code to insert the letter 'a' in-between each letter to form the word 'papaya!'
#python #practiceCode #samples #interviewQuestions #strings #list
name = 'ppy!'
Write code to insert the letter 'a' in-between each letter to form the word 'papaya!'
#python #practiceCode #samples #interviewQuestions #strings #list
.
a = 1
b = 2
Swap the values without using an additional variable.
#python #practiceCode #samples #interviewQuestions
a = 1
b = 2
Swap the values without using an additional variable.
#python #practiceCode #samples #interviewQuestions
#interviewQuestions : 0001
What is Python?
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics, automatic memory management.
What is Python?
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics, automatic memory management.
#interviewQuestions : 0002
Explain the features of Python / Say something about the benefits of using Python?
Python is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Web Development Domain. I will list down some of the key advantages of learning Python:
○ Simple and easy to learn:
* Learning python programming language is easy and fun.
* Compared to other language, like, Java or C++, its syntax is a way lot easier.
* You also don’t have to worry about the missing semicolons (;) in the end!
* It is more expressive means that it is more understandable and readable.
* Python is a great language for the beginner-level programmers.
* It supports the development of a wide range of applications from simple text processing to WWW browsers to games.
* Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax. This makes it easy for Beginners to pick up the language quickly.
* Easy-to-read − Python code is more clearly defined and readable. It's almost like plain and simple English.
* Easy-to-maintain − Python's source code is fairly easy-to-maintain.
Features of Python
○ Python is Interpreted −
* Python is processed at runtime by the interpreter.
* You do not need to compile your program before executing it. This is similar to PERL and PHP.
○ Python is Interactive −
* Python has support for an interactive mode which allows interactive testing and debugging of snippets of code.
* You can open the interactive terminal also referred to as Python prompt and interact with the interpreter directly to write your programs.
○ Python is Object-Oriented −
* Python not only supports functional and structured programming methods, but Object Oriented Principles.
○ Scripting Language —
* Python can be used as a scripting language or it can be compliled to byte-code for building large applications.
○ Dynammic language —
* It provides very high-level dynamic data types and supports dynamic type checking.
○ Garbage collection —
* Garbage collection is a process where the objects that are no longer reachable are freed from memory.
* Memory management is very important while writing programs and python supports automatic garbage collection, which is one of the main problems in writing programs using C & C++.
○ Large Open Source Community —
* Python has a large open source community and which is one of its main strength.
* And its libraries, from open source 118 thousand plus and counting.
* If you are stuck with an issue, you don’t have to worry at all because python has a huge community for help. So, if you have any queries, you can directly seek help from millions of python community members.
* A broad standard library − Python's bulk of the library is very portable and cross-platform compatible on UNIX, Windows, and Macintosh.
* Extendable − You can add low-level modules to the Python interpreter. These modules enable programmers to add to or customize their tools to be more efficient.
○ Cross-platform Language —
* Python is a Cross-platform language or Portable language.
* Python can run on a wide variety of hardware platforms and has the same interface on all platforms.
* Python can run on different platforms such as Windows, Linux, Unix and Macintosh etc.
Explain the features of Python / Say something about the benefits of using Python?
Python is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Web Development Domain. I will list down some of the key advantages of learning Python:
○ Simple and easy to learn:
* Learning python programming language is easy and fun.
* Compared to other language, like, Java or C++, its syntax is a way lot easier.
* You also don’t have to worry about the missing semicolons (;) in the end!
* It is more expressive means that it is more understandable and readable.
* Python is a great language for the beginner-level programmers.
* It supports the development of a wide range of applications from simple text processing to WWW browsers to games.
* Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax. This makes it easy for Beginners to pick up the language quickly.
* Easy-to-read − Python code is more clearly defined and readable. It's almost like plain and simple English.
* Easy-to-maintain − Python's source code is fairly easy-to-maintain.
Features of Python
○ Python is Interpreted −
* Python is processed at runtime by the interpreter.
* You do not need to compile your program before executing it. This is similar to PERL and PHP.
○ Python is Interactive −
* Python has support for an interactive mode which allows interactive testing and debugging of snippets of code.
* You can open the interactive terminal also referred to as Python prompt and interact with the interpreter directly to write your programs.
○ Python is Object-Oriented −
* Python not only supports functional and structured programming methods, but Object Oriented Principles.
○ Scripting Language —
* Python can be used as a scripting language or it can be compliled to byte-code for building large applications.
○ Dynammic language —
* It provides very high-level dynamic data types and supports dynamic type checking.
○ Garbage collection —
* Garbage collection is a process where the objects that are no longer reachable are freed from memory.
* Memory management is very important while writing programs and python supports automatic garbage collection, which is one of the main problems in writing programs using C & C++.
○ Large Open Source Community —
* Python has a large open source community and which is one of its main strength.
* And its libraries, from open source 118 thousand plus and counting.
* If you are stuck with an issue, you don’t have to worry at all because python has a huge community for help. So, if you have any queries, you can directly seek help from millions of python community members.
* A broad standard library − Python's bulk of the library is very portable and cross-platform compatible on UNIX, Windows, and Macintosh.
* Extendable − You can add low-level modules to the Python interpreter. These modules enable programmers to add to or customize their tools to be more efficient.
○ Cross-platform Language —
* Python is a Cross-platform language or Portable language.
* Python can run on a wide variety of hardware platforms and has the same interface on all platforms.
* Python can run on different platforms such as Windows, Linux, Unix and Macintosh etc.