Skip to main content

Posts

Showing posts from July, 2017

Top 25 Python Interview Questions and Answers Prepared by Experts

1. What is JSON? How would convert JSON data into Python data? JSON – stands for JavaScript Object Notation. It is a popular data format for storing data in NoSQL databases. Generally JSON is built on 2 structures.  A collection of <name, value> pairs.  An ordered list of values. As Python supports JSON parsers, JSON-based data is actually represented as a dictionary in Python. You can convert json data into python using load() of json module. 2. How are the functions help() and dir() different? These are the two functions that are accessible from the Python Interpreter. These two functions are used for viewing a consolidated dump of built-in functions. help() – it will display the documentation string. It is used to see the help related to modules, keywords, attributes, etc. To view the help related to string datatype, just execute a statement help(str) – it will display the documentation for ‘str, module. ◦ Eg: >>>help(str) or >>...

Python real time Interview Questions and Answers

Q1).What is Python? Ans1:  Python is a high-level, interpreted, interactive and object-oriented scripting language.  Python  is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it h as fewer syntactical constructions than other languages. Q2).Name some of the features of Python. Ans2:  Following are some of the salient features of python − It supports functional and structured programming methods as well as OOP. It can be used as a scripting language or can be compiled to byte-code for building large applications. It provides very high-level dynamic data types and supports dynamic type checking. It supports automatic garbage collection. It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java. Q3).Do you have any personal projects? Really? Ans3: This shows that you are willing to do more than the bare minimum in terms of keeping your skillset up to date. If you work on per...

Data Science in Python Interview Questions and Answers

Q1). How can you build a simple logistic regression model in Python? Q2). How can you train and interpret a linear regression model in SciKit learn? Q3).Name a few libraries in Python used for Data Analysis and Scientific computations. Ans1.2.3:   NumPy, SciPy, Pandas, SciKit, Matplotlib, Seaborn   Q4).Which library would you prefer for plotting in Python language: Seaborn or Matplotlib? Ans4:   Matplotlib is the python library used for plotting but it needs lot of fine-tuning to ensure that the plots look shiny. Seaborn helps data scientists create statistically and aesthetically appealing meaningful plots. The answer to this question varies based on the requirements for plotting data.   Q5).What is the main difference between a Pandas series and a single-column DataFrame in Python? Q6). Write code to sort a DataFrame in Python in descending order. Q7). How can you handle duplicate values in a dataset for a variable in Python? Q8). Which Random F...

Python Flask Interview Questions and Answers

Q1). What is Flask? Ans1 : Flask is a web micro framework for  Python  based on “Werkzeug, Jinja 2 and good intentions” BSD licensed. Werkzeug and jingja are two of its dependencies. Q2). What is the benefit of using Flask? Ans2:  Flask is part of the micro-framework. Which means it will have little to no dependencies on external libraries. It makes the framework light while there is little dependency to update and less security bugs. Q3). What is the difference between  Django,  Pyramid, and Flask? Ans3:  Flask is a “microframework” primarily build for a small application with simpler requirements. In flask, you have to use external libraries. Flask is ready to use.Pyramid are build for larger applications. It provides flexibility and lets the developer use the right tools for their project. The developer can choose the database, URL structure, templating style and more. Pyramid is heavy configurable. Q4). What is Flask-WTF and what are t...

Python Pandas Interview Questions and Answers

1Q).What is Pandas/Python Pandas? Ans1: Pandas  is a  Python  package providing fast, flexible, and expressive data structures designed to make working with “relational” or “labeled” data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in  Python . 2Q).   What is Python pandas used for? Ans2:   pandas  is a software library written for the  Python  programming language for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series.  pandas  is free software released under the three-clause BSD license.   3Q).   What is a pandas DataFrame? Ans3: DataFrame  is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it like a spreadsheet or SQL table, or a dict of Series objects. It is generally the most co...

Automation Testing Python Interview Questions

1.What is Python? What are the benefits of using Python? Answer: Python is a programming language with objects, modules, threads, exceptions and automatic memory management. The benefits of pythons are that it is simple and easy, portable, extensible, build-in data structure and it is an open source. 2.   How Python can be used in software testing?  Answer: 1. To generate test data; parse test results; generate reports; testing API calls etc. 2. Python to extract requirements from a Word document. 3. For testing tasks automation, setting up environments for tests, extracting performance data, etc… 4. Testers use Python extensively in many companies with Selenium for test automation. 5. For writing desktop applications used by testers. 6. Test data manipulation. 7. To build test environment 8. Testing with IronPython on .NET  3.What Python frameworks do you know?  Answer:  Framework called Web2py, PAMIE (Python automation Module for I. E.), The p...

Will Python Replace Java?

According to the IT programming trend,  Java  is currently more popular than other programming languages in terms of number of jobs, number of existing Java developers and overall usage statics in IT compared to  Python . According to the latest usage statistics posted on a popular Technology Survey site, Java is being used by 3.0% websites as a server-side programming language, whereas only 0.2% of websites use Python. However, all the recent reports have highlighted that the usage and popularity of Python is growing drastically compared to Java where the Java usage is coming down year on year. At  myTectra  we have been monitoring the Trend of Python and Java since 2013 based on number of Jobs posted in Naurki  for Bangalore region since 2013. In the below table we could able to see that Java requirement is coming down year on year whereas Python requirement has grown from 200 in 2014 to 6500+ in 2017. >>Read more<<