Skip to main content

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 personal projects and code outside of the workplace then employers are more likely to see you as an asset that will grow. Even if they don’t ask this question I find it’s useful to broach the subject.
Q4).Is python a case sensitive language?
Ans4: Yes! Python is a case sensitive programming language.
What are the supported data types in Python?
Python has five standard data types −
  • Numbers
  • String
  • List
  • Tuple
  • Dictionary
Q5).What is the output of print str if str = ‘Hello World!’?
Ans5: It will print complete string. Output would be Hello World!.
Q6).What is the output of print str[0] if str = ‘Hello World!’?
Ans6: It will print first character of the string. Output would be H.
Q7).What is the output of print str[2:5] if str = ‘Hello World!’?
Ans7: It will print characters starting from 3rd to 5th. Output would be llo.
Q8).What is the output of print str[2:] if str = ‘Hello World!’?
Ans8: It will print characters starting from 3rd character. Output would be llo World!.
Q9).What is the output of print str * 2 if str = ‘Hello World!’?
Ans9: It will print string two times. Output would be Hello World!Hello World!.
Q10).What is the output of print str + “TEST” if str = ‘Hello World!’?
Ans10: It will print concatenated string. Output would be Hello World!TEST.

Comments

Popular posts from this blog

SAP GRC Interview Questions and Answers

1.What is the use of  SAP GRC? SAP Governance , Risk and Compliance solution enables organization to manage regulations and compliance and remove any risk in managing organizations key operations. As per changing market situation organizations are growing and rapidly changing and inappropriate documents, spreadsheets are not acceptable for external auditors and regulators. 2.What are the different activities that you can perform in SAP GRC? SAP GRC helps organization to manage their regulations and compliance and you can perform following activities Easy integration of GRC activities into existing process and automating key GRC activities. Low complexity and managing risk efficiently. Improve risk management activities. Managing fraud in business processed and audit management effectively. Organizations perform better and companies can protect their values. SAP GRC solution consists of three main areas: Analyze, manage and monitor. 3.What are the different GRC m...

Apache Kafka Interview Questions and Answers

Q1) .Mention what is Apache Kafka? Ans:   Apache Kafka is a publish-subscribe messaging system developed by Apache written in Scala. It is a distributed, partitioned and replicated log service. Q2). Mention what is the traditional method of message transfer? Ans:   The traditional method of message transfer includes two methods   Queuing: In a queuing, a pool of consumers may read message from the server and each message goes to one of them •   Publish-Subscribe: In this model, messages are broadcasted to all consumers Kafka caters single consumer abstraction that generalized both of the above- the consumer group. Q3). Mention what is the benefits of Apache Kafka over the traditional technique? Ans:   Apache Kafka has following benefits above traditional messaging technique Fast: A single Kafka broker can serve thousands of clients by handling megabytes of reads and writes per second •   Scalable : Data are partitioned and streamlined ove...

Django Interview Questions and Answers

Q1).Explain what is Django? Ans1:   Django  is a web framework in python to develop a web application in python. Django is a free and open source web application framework, written in Python. Q2).Mention what are the features available in Django? Ans2:  Features available in Django are Admin Interface (CRUD) Templating Form handling Internationalization Session, user management, role-based permissions Object-relational mapping (ORM) Testing Framework Fantastic Documentation Q3).Mention the architecture of Django architecture? Ans3:  Django architecture consists of Models:  It describes your database schema and your data structure Views:  It controls what a user sees, the view retrieves data from appropriate models and execute any calculation made to the data and pass it to the template Templates:  It determines how the user sees it. It describes how the data received from the views should be changed or formatted for display on the p...