Question

explanations of the python. Explain in least 1 to 2 page about python; this can serve...

  1. explanations of the python. Explain in least 1 to 2 page about python; this can serve as a brief tutorial of that language. Please explain some language syntax, platforms (run on Windows / Mac / Linux, smart phones, internet, etc.), strength of the language, applications etc.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language

  • 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.

syntax:-

Python Line Structure:

A Python program is divided into a number of logical lines and every logical line is terminated by the token NEWLINE. A logical line is created from one or more physical lines.
A line contains only spaces, tabs, formfeeds possibly a comment, is known as a blank line, and Python interpreter ignores it.
A physical line is a sequence of characters terminated by an end-of-line sequence (in windows it is called CR LF or return followed by a linefeed and in Unix, it is called LF or linefeed). See the following example.

Comments in Python:

A comment begins with a hash character(#) which is not a part of the string literal and ends at the end of the physical line. All characters after the # character up to the end of the line are part of the comment and the Python interpreter ignores them. See the following example. It should be noted that Python has no multi-lines or block comments facility.

Joining two lines:

When you want to write a long code in a single line you can break the logical line in two or more physical lines using backslash character(\). Therefore when a physical line ends with a backslash characters(\) and not a part of a string literal or comment then it can join another physical line. See the following example.

Multiple Statements on a Single Line:

You can write two separate statements into a single line using a semicolon (;) character between two line.

Indentation:

Python uses whitespace (spaces and tabs) to define program blocks whereas other languages like C, C++ use braces ({}) to indicate blocks of codes for class, functions or flow control. The number of whitespaces (spaces and tabs) in the indentation is not fixed, but all statements within the block must be the indented same amount. In the following program, the block statements have no indentation.

This is a program with single space indentation.

This is a program with single tab indentation.

Here is an another program with an indentation of a single space + a single tab.

Python Coding Style:

  • Use 4 spaces per indentation and no tabs.
  • Do not mix tabs and spaces. Tabs create confusion and it is recommended to use only spaces.
  • Maximum line length : 79 characters which help users with a small display.
  • Use blank lines to separate top-level function and class definitions and single blank line to separate methods definitions inside a class and larger blocks of code inside functions.
  • When possible, put inline comments (should be complete sentences).
  • Use spaces around expressions and statements.

platforms:-

Python is a cross-platform language: a Python program written on a Macintosh computer will run on a Linux system and vice versa. Python programs can run on a Windows computer, as long as the Windows machine has the Python interpreter installed (most other operating systems come with Python pre-installed). An application called py2exe exists that allows a user to create a Windows binary from a Python program so that a Python program developed on another system can be run on a Windows machine that does not have Python installed.

Python differs from many other languages in its use of white space and indentations. While many other languages end programming statements using line endings such as semicolons, Python has no such ending. It also does not enclose code blocks such as for loops and if statements in curly braces. Rather, Python uses indentations to define a code block

strengths:-

1. Presence of Third Party Modules:

The Python Package Index (PyPI) contains numerous third-party modules that make Python capable of interacting with most of the other languages and platforms.

2. Extensive Support Libraries:

Python provides a large standard library which includes areas like internet protocols, string operations, web services tools and operating system interfaces. Many high use programming tasks have already been scripted into the standard library which reduces length of code to be written significantly.

3. Open Source and Community Development:

Python language is developed under an OSI-approved open source license, which makes it free to use and distribute, including for commercial purposes.

Further, its development is driven by the community which collaborates for its code through hosting conferences and mailing lists, and provides for its numerous modules.

4. Learning Ease and Support Available:

Python offers excellent readability and uncluttered simple-to-learn syntax which helps beginners to utilize this programming language. The code style guidelines, PEP 8, provide a set of rules to facilitate the formatting of code. Additionally, the wide base of users and active developers has resulted in a rich internet resource bank to encourage development and the continued adoption of the language.

5. User-friendly Data Structures:

Python has built-in list and dictionary data structures which can be used to construct fast runtime data structures. Further, Python also provides the option of dynamic high-level data typing which reduces the length of support code that is needed.

applications:-

  • GUI based desktop applications
    • Image processing and graphic design applications
    • Scientific and computational applications
    • Games
  • Web frameworks and web applications
  • Enterprise and business applications
  • Operating systems
  • Language development
  • Prototyping
Add a comment
Know the answer?
Add Answer to:
explanations of the python. Explain in least 1 to 2 page about python; this can serve...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Think about a healthcare organization that you know (or have researched). In a 1-2 page paper,...

    Think about a healthcare organization that you know (or have researched). In a 1-2 page paper, explain why they should devote time to planning. Identify and describe three things the organization can accomplish by the planning process. Be sure to format your research sources per APA standards and use in-text citations where necessary. Also, be sure to include a reference page. For more information on APA, please visit the Online Library, which is available through the Resources tab. Submit your completed assignment to...

  • Think about a healthcare organization that you know (or have researched). In a 1-2 page paper,...

    Think about a healthcare organization that you know (or have researched). In a 1-2 page paper, explain why they should devote time to planning. Identify and describe three things the organization can accomplish by the planning process. Be sure to format your research sources per APA standards and use in-text citations where necessary. Also, be sure to include a reference page. For more information on APA, please visit the Online Library, which is available through the Resources tab. Submit your completed assignment to...

  • please give me clear picture Section 1: DNS nslookup The Domain Name System (DNS) translates hostnames...

    please give me clear picture Section 1: DNS nslookup The Domain Name System (DNS) translates hostnames to IP addresses, fulfilling a critical role in the Internet infrastructure. In this lab, we’ll take a closer look at the client side of DNS. Recall that the client’s role in the DNS is relatively simple – a client sends a query to its local DNS server, and receives a response back. Much can go on “under the covers,” invisible to the DNS clients,...

  • 166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls...

    166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls and Os) goes in and out of a machine physically is through the NIC (network interface card). The way network communication goes in and out of a machine logically though, is through a program or service. A service is a program that runs in the background, independent of a logon, that provides functionalities to a system. Windows client machines, for instance, have a Workstation...

  • It's time to put everything you've learned together and do something fun with Python! Be creative,...

    It's time to put everything you've learned together and do something fun with Python! Be creative, do your best, and have fun! Your project will be automatically included in the pool of students' work. If selected, your project will be used as a demonstration to current and prospective students in the future. Please let me know if you prefer NOT to include your project to be in the pool of demonstrating projects. Project Description Create a real-world scenario of a...

  • . NEED ANSWER ASAP / ANSWER NEVER USED BEFORE Potential Technology Solution You will need to...

    . NEED ANSWER ASAP / ANSWER NEVER USED BEFORE Potential Technology Solution You will need to select a technology category that will serve as a solution for the problem or opportunity you have identified for the selected business. it is important to differentiate between a technology solution category (or technology category) and a specific vendor or product. The technology category is a broad area, such as CRM system or web analytics. A vendor/product is a specific company or product, such...

  • Can Dogs Understand Human Cues? EXPLORATION Dogs have been domesticated for about 14,000 years. In that...

    Can Dogs Understand Human Cues? EXPLORATION Dogs have been domesticated for about 14,000 years. In that time, have they been able to develop an understanding of human gestures such as pointing or glancing? How about simi lar nonhuman cues? Researchers Udell, Giglio, and Wynne tested a small number of dogs in order to answer these questions. In this exploration, we wll first see whether dogs can understand human gestures as well as nonhuman gestures. To test this, the researchers positioned...

  • 1. In what ways was Microsoft’s behaviour (a) against the public interest; (b) in the public...

    1. In what ways was Microsoft’s behaviour (a) against the public interest; (b) in the public interest? 2. Being locked in to a product or technology is only a problem if such a product can be clearly shown to be inferior to an alternative. What difficulties might there be in establishing such a case? etwork effects Microsoft is a vertically integrated firm (see page 87), with a dominant position in the operating system market (i.e. Windows) and in certain application...

  • Attached is the memo that was covered briefly in the lecture video from this week. Open...

    Attached is the memo that was covered briefly in the lecture video from this week. Open the attachment and read the memo. Then, write a better memo, using the principles you learned from the chapter and video (you may completely write a new memo, using information found in the memo.). Hint: a better memo would be MUCH shorter than the original. The key to writing a good memo in this case is to keep in mind how you would want...

  • C programming is the main one and pick another code of choice!!! Background This assignment is...

    C programming is the main one and pick another code of choice!!! Background This assignment is based on one of the Big Ideas in this course, namely that reading C source code is a real aid in learning how to write C code. To that end, in this project, you write a program that scans C source from the 'Net and calculates some simple statistics. We're learning lots of concepts, and by running the program you write here on several...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT