Python Learning Day1

Source: Internet
Author: User

1. Configuring the notepate++ Python environment (under OS Installation python)

(1) Run button, notepad++, run menu

(2) Enter the following command in the popup window:

cmd/k python "$ (full_current_path)" & ECHO. & PAUSE & EXIT

Then click "Save", feel free to take a name, such as "Runpython", for convenience, configure the shortcut keys (such as Ctrl + F5), click OK. Then run the Python file simply by pressing the configured shortcut key or by clicking "Runpython 3.6" on the Run menu.

Python: Name of the execution file configured for the environment variable

2. Program Writing

(1) Hello Word

Print "Hello,world"

(2) Input and output

Code Listing 1:

A =int(input ("A:"=int(input ("B:")  ) C=a/bprint ("sum:", c)

Output Result:

a:1b:3sum:0.3333333333333333

Code Listing 2:

A =float(input ("A:"=int(input ("B:")  ) C=a/bprint ("sum:", c)

Output Result:

A:1.3B:30.43333333333333335

Code Listing 3:

A =float(input ("A:"=3c=a/bprint ("  sum:", c)

Output Result:

A:3.21.0666666666666667

Python Learning Day1

Related Article

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.