Article Directory
1. Download PyCharm-2020.1.1
- Download link: https://pan.baidu.com/s/1VGYdRqkyOV1epc_WX8un4w
- Extraction code: nbae
2. Download jetbrains-agent-latest.zip
- Download link: https://pan.baidu.com/s/1thqvb9wP1dSlbGVJZbPDiQ
- Extraction code: oqyt
Three, install PyCharm-2020.1.1
- Double-click the installer icon to enter the installation wizard
- Set installation destination
- Set installation options
- Select start menu folder
- Installing……
- The installation is complete
Fourth, start PyCharm and register
- Start PyCharm, choose free evaluation
- Create new project
- Set project location and name
- Drag the compressed file into the development environment window
- Click [Restart] button, select activation method-License server
- Click the Help | About menu option
Licensed to howard
-Indicates successful registration
Five, configure the Pycharm environment
- Open the settings dialog
1. Use the mouse to modify the font size
2. Set the font and size of the editing area
3. Install third-party libraries or packages
- Install numpy package
- Similarly, install matplotlib, scipy, pandas packages
Six, interactive use of Python
- Enter Python Console
- Output a message
- Do addition
- Plot the normal distribution curve
Seven, write Python programs
1. Write a summation program
- Programming
- Run the program and view the results
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