0 Fundamentals of python-1.6 error programs

Source: Internet
Author: User

This section discusses what happens when a program is in error?

1. Also the code for the above section as an example

Print ("Hello World") print ("I am Ray") Print ("I love China \ n" * 8) Print ("Welcome to my Class") print (over ")


The last sentence there, obviously missing a double quotation mark, after clicking F5 or Run module, the following situation will appear



Through the picture can see, the red place is the wrong number of lines, and then, pop-up prompt box, prompt the wrong type

Another example:

We add a print to the program ("Over" +5)

When you press F5 to run, it appears


Explain the above paragraph is an error message

Traceback (most recent): #错误信息的开始
File "C:/Documents and settings/administrator/desktop/python/ch01/1.5/script_ch01_05_001.py", line 5, <module> #错误信息的行数
Print ("Over" +5)
Typeerror:can ' t convert ' int ' object to str implicitly #python认为出现什么问题




This is the section here, thank you.

------------------------------------------------------------------

Click to jump 0 basic python-Catalogue



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

0 Fundamentals of python-1.6 error programs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.