Python study notes: integrated development environment

1. Download PyCharm-2020.1.1

2. Download jetbrains-agent-latest.zip

Three, install PyCharm-2020.1.1

  • Double-click the installer icon to enter the installation wizard
    Insert picture description here
  • Set installation destination
    Insert picture description here
  • Set installation options
    Insert picture description here
  • Select start menu folder
    Insert picture description here
  • Installing……
    Insert picture description here
  • The installation is complete
    Insert picture description here

Fourth, start PyCharm and register

  • Start PyCharm, choose free evaluationInsert picture description here
  • Create new project
    Insert picture description here
  • Set project location and name
    Insert picture description here
    Insert picture description here
  • Drag the compressed file into the development environment window
    Insert picture description here
    Insert picture description here
  • Click [Restart] button, select activation method-License server

Insert picture description here
Insert picture description here
Insert picture description here

  • Click the Help | About menu option
    Insert picture description here
  • Licensed to howard -Indicates successful registration

Five, configure the Pycharm environment

  • Open the settings dialog
    Insert picture description here
    Insert picture description here

1. Use the mouse to modify the font size

Insert picture description here

2. Set the font and size of the editing area

Insert picture description here

3. Install third-party libraries or packages

Insert picture description here

  • Install numpy package
    Insert picture description here
    Insert picture description here
    Insert picture description here
  • Similarly, install matplotlib, scipy, pandas packages
    Insert picture description here

Six, interactive use of Python

  • Enter Python Console
    Insert picture description here
    Insert picture description here
  • Output a message
    Insert picture description here
  • Do addition
    Insert picture description here
  • Plot the normal distribution curve
    Insert picture description here

Seven, write Python programs

1. Write a summation program

  • Programming
    Insert picture description here
  • Run the program and view the results
    Insert picture description here

2. Draw a normal distribution curve

  • Programming
"""
不同参数下的正态分布
"""

import numpy as np
from scipy.stats import norm
import matplotlib.pyplot as plt

plt.figure(figsize=(8, 6), dpi=100)
x = np.linspace(-5, 5, 100)
plt.plot(x, norm.pdf(x, 0, 1), 'r', linewidth=1, label='μ=0, σ=1')
plt.plot(x, norm.pdf(x, 0, 2), 'b', linewidth=2, label='μ=0, σ=2')
plt.plot(x, norm.pdf(x, 2, 1), 'g', linewidth=3, label='μ=2, σ=1')
plt.xlabel('Value')
plt.ylabel('Density')
plt.title('Normal Distribution Curves')
plt.legend()
plt.show()
  • Run the program and view the results
    Insert picture description here

Guess you like

Origin blog.csdn.net/howard2005/article/details/109336729