pycharm入门学习引导

本文档源自PyCharm2022.1.1版本

内容为学习PyCharm的IDE功能

目录

pycharm入门学习引导

入门引导

熟悉Pycharm​编辑​编辑

编辑器基础知识

上下文操作

搜索操作

扩大和缩小代码选取

注释行

复制和删除行

移动代码段

收起

环绕和解开

多选

代码补全

基本补全

选项卡补全

后缀补全

类型匹配补全

F-string补全

重构

重构菜单

重命名

提取变量

提取方法

快速修复重构

就地重构

代码辅助

恢复移除的代码

代码格式

形参信息

快速弹出窗口

编辑器编码辅助

导航

随处搜索

在文件中查找并替换

声名和用法

文件结构

最近的文件和位置

运行并调试试运行配置

调试工作流

GIT

快速入门

项目历史记录

提交

互动式变基

使用Git追溯注解


入门引导

PyCharm 中的主要功能概述(代码中的#为光标初始位置,或提示选中位置)

熟悉Pycharm

​​def find_average(values):result = 0for v in values:result += vreturn resultprint("AVERAGE", find_average([5,6, 7, 8]))

编辑器基础知识

使用智能快捷键添加、删除、选择、移动和复制代码。

上下文操作

def method_with_unused_parameter(used, #redundant):print("It is used parameter: " + str(used))def intention_example(a, b):if not (a and b):return 1return 2method_with_unused_parameter("first", "second")
method_with_unused_parameter("used", "unused")
intention_example(True, False)

搜索操作

#print('Hello!' '\n' 'Press Ctrl + Shift + A')

扩大和缩小代码选取

def some_method(first, second, third):print(first, second, third)def example_method(condition):if condition:print("Begin of the work")some_method("first string", "This is a long string th#at you can select for refactoring", "third string")print("End of the work")print("The end")

注释行

#for i in range(5):print(i)primes = [2, 3, 5, 7]for prime in primes:print(prime)

复制和删除行

import mathdef demo(a, b, c):return_type_of_sqrt = math.sqrt(b ** 2 - 4 * a * c)root1 = (-b + return_type_of_sqrt) / (2 * a)root2 = (-b - return_type_of_sqrt) / (2 * a)#print(root1, root2)

移动代码段

class Car:def __init__(self, speed=0):self.speed = speedself.odometer = 0self.time = 0def say_state(self):print("I'm going {} kph!".format(self.speed))def accelerate(self):#print("I will be vary fast!")self.speed += 5

收起

import math
import sysdef demo(a, b, c):n = float(sys.argv[1])d = b ** 2 - n * a * cif d > 0:disc = math.sqrt(d)root1 = (-b + disc) / (2 * a)root2 = (-b - disc) / (2 * a)return root1, root2elif d == 0:return -b / (2 * a)else:return "This equation has no roots"class Solver:class Roots:passpassclass Roots:passif __name__ == '__main__':solver = Solver()a = int(input("a: "))b = int(input("b: "))c = int(input("c: "))result = demo(a, b, c)print(result)
#

环绕和解开

def surround_and_unwrap_demo(debug):if debug:print("Surround and Unwrap me!")

多选

<!doctype html>
<html lang="en"><head><meta charset="UTF-8"><title>Multiple selections</title></head><body><table><tr><#th>Firstname</th><th>Lastname</th><th>Points</th></tr><tr><td>Eve</td><td>Jackson</td><td>94</td></tr></table></body>
</html>

代码补全

让IDE补全您的代码。尝试基本、智能和其他类型的补全。

基本补全

movies_dict = {'title': 'Aviator','year': '2005','demo': False,'director': 'Martin Scorsese','distributor': 'Miramax Films'
}def director():return movies_dict[#]

选项卡补全

class Calculator:def __init__(self):self.current = 0self.total = 0def add(self, amount):self.current += amountdef get_current(self):return self.#current

后缀补全

movies_dict = {'title': 'Aviator','year': '2005','director': 'Martin Scorsese','distributor': 'Miramax Films'
}movies_dict.get('year')#

类型匹配补全

def f(x, file):x.append(file)x.rem#

F-string补全

import sysclass Car:def __init__(self, speed=0):self.speed = speedself.odometer = 0self.time = 0def say_state(self):print("I'm going kph!".format(self.speed))def accelerate(self):self.speed += 5def brake(self):self.speed -= 5def step(self):self.odometer += self.speedself.time += 1def average_speed(self):return self.odometer / self.time
if __name__ == '__main__':my_car_show_distance = sys.argv[1]my_car = Car()print("I'm a car!")while True:action = input("What should I do? [A]ccelerate, [B]rake, ""show [O]dometer, or show average [S]peed?").upper()if action not in "ABOS" or len(action) != 1:print("I don't know how to do that")if my_car_show_distance == "yes":print("The car has driven # kilometers")

重构

通过重命名、提取和其他类型的重构保持代码整洁。

重构菜单

# Need to think about better sample!
import randomdef foo(x):print(x + random#)

重命名

class Championship:def __init__(self):self.teams = 0def matches_count(self):return self.teams * (self.teams - 1) / 2def add_new_team(self):self.teams += 1def team_matches(champ):champ.teams() - 1class Company:def __init__(self, t):self.teams = tdef company_members(company):map(lambda team : team.name, company.teams)def teams():return 16c = Championship()c.teams# = teams()print(c.teams)

提取变量

def bubble_sort(arr):n = len(arr)for j in range(n):for i in range(0, n - j - 1):if arr[i] > arr[i + 1] : #光标选中i+1arr[i], arr[i + 1] = arr[i + 1], arr[i]

提取方法

def cocktail_sort(a):n = len(a)swapped = Truestart = 0end = n - 1while swapped:swapped = Falsefor i in range(start, end):if a[i] > a[i + 1]:a[i], a[i + 1] = a[i + 1], a[i]#选中整行swapped = Trueif not swapped:breakswapped = Falseend = end - 1for i in range(end - 1, start - 1, -1):if a[i] > a[i + 1]:a[i], a[i + 1] = a[i + 1], a[i]swapped = Truestart = start + 1

快速修复重构

def foo(x):print("Hello ", x)y = 20
foo(10#)
foo(30)

就地重构

def fibonacci(stop):first = 0s# = 1while s < stop:print(s)first, s = s, first + sn = int(input("n = "))
fibonacci(n)

代码辅助

了解如何设置代码格式、获得形参信息和预览快速弹出窗口。

恢复移除的代码

cat:name: Pelmengender: malebreed: sphinxfur_type: hairlessfur_pattern: solidfur_colors: [ white ]tail_length: longeyes_colors: [ green ]favourite_things:- three plaids- pile of clothes- castle of boxes- toys scattered all over the placebehavior:
#选中以下5行- play:                   condition: boringactions:- bring one of the favourite toys to the human- run all over the house- eat:condition: want to eatactions:- shout to the whole house- sharpen claws by the sofa- wake up a human in the middle of the night

代码格式

import sys
import mathclass CodeFormatDemo:a_const = 10000b_const = 500
#选中以下两行def calc_and_print(self):print(self.a_const * self.b_const)def calc_many_times(self):for i in range(100):self.calc_and_print()

形参信息


class Frame:width = 0height = 0def __init__(self):passdef set_size(self, width, height):self.width = widthself.height = heightframe = Frame()
frame.set_size(#)

快速弹出窗口


def print_three_times(value):"""Prints given value three times"""for i in range(0, 3):print(str(value))print_three_times(123)
print_three_times(1)
print_three_times('Hello!')

编辑器编码辅助

#import randomclass Cat:happiness = math.exp(3)def say_meow(self):print("meow")def eat(self):self.happiness += random.randint(5, 20)cat = Cat()
cat.say_meow("meow")
cat.eat()

导航

跳转到源,导航到声明、实现和文件结构。

随处搜索

from quadratic_equations_solver import QuadraticEquationsSolverprint("Enter 3 coefficients of full quadratic equation: ")
a, b, c = list(map(float, input().split()))
if a == 0 or b == 0 or c == 0:print("Any of coefficients is zero. It is not full quadratic equation.")
else:solver = QuadraticEquationsSolver()d = solver.discriminant(a, b, c)print("Discriminant of this equation is {.3f}".format(d))print("Solution is:")solver.solve(a, b, c)

在文件中查找并替换

from warehouse import Warehousewarehouse = Warehouse()
warehouse.add_fruits('peach', 3)
warehouse.add_fruits('pineapple', 5)
warehouse.add_fruits('mango', 1)
warehouse.add_fruits('apple', 5)result = warehouse.take_fruit('apple')
if result:print('This apple was delicious!')warehouse.print_all_fruits()

声名和用法

from quadratic_equations_solver import QuadraticEquationsSolverprint("Enter 3 coefficients of full quadratic equation: ")
a, b, c = list(map(float, input().split()))
if a == 0 or b == 0 or c == 0:print("Any of coefficients is zero. It is not full quadratic equation.")
else:solver = QuadraticEquationsSolver()d = solver.discr#iminant(a, b, c)print("Discriminant of this equation is {.3f}".format(d))print("Solution is:")solver.solve(a, b, c)

文件结构

quadratic_str = "quadratic"
quad = "quad"class FileStructureDemo:def __init__(self):passdef hello_world(self):print("Hello world!")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def welcome(self):print("JetBrains is aiming to create the best IDEs in the world!")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def print_hippogryph(self):print("Hippogryph! Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def hospital_information(self):print("Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def print_home_design(self):print("Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def print_homo_neanderthalensis(self):print("Homo Neanderthalensis is a parallel evolution branch of humans.")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def print_homo_sapiens(self):print("Homo Sapiens is a biological name of modern humans.")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def print_homo_erectus(self):print("Homo Erectus is most likely the ancestor of modern humans.")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def print_sapphire(self):print("Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def phone_description(self):print("Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def foo(self):print("Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def boo(self):print("Just another method to illustrate fast file structure search :)")# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)# A lot of code can be inside methods :)def animal(self):print("Just another method to illustrate fast file structure search :)")def parrot(self):print("Just another method to illustrate fast file structure search :)")def plain(self):print("Just another method to illustrate fast file structure search :)")def air(self):print("Just another method to illustrate fast file structure search :)")def aim(self):print("Just another method to illustrate fast file structure search :)")def book(self):print("Just another method to illustrate fast file structure search :)")def bank(self):print("Just another method to illustrate fast file structure search :)")def boring(self):print("Just another method to illustrate fast file structure search :)")def car(self):print("Just another method to illustrate fast file structure search :)")def cancel(self):print("Just another method to illustrate fast file structure search :)")def zoo(self):print("Just another method to illustrate fast file structure search :)")def zero(self):print("Just another method to illustrate fast file structure search :)")def first(self):print("Just another method to illustrate fast file structure search :)")def second(self):print("Just another method to illustrate fast file structure search :)")def direction(self):print("Just another method to illustrate fast file structure search :)")def director(self):print("Just another method to illustrate fast file structure search :)")class AnotherClass:def __init__(self):passdef another_method_1(self):print("Just another method to illustrate fast file structure search :)")def another_method_2(self):print("Just another method to illustrate fast file structure search :)")def homo_history(self):print("Just another method to illustrate fast file structure search :)")

最近的文件和位置

numbers = [15, 23, 8, 4, 42, 16]
lucky_numbers = #sorted(numbers)

运行并调试
试运行配置

def find_average(value):check_input(value)result = 0for s in value:result += validate_number(extract_number(remove_quotes(s)))return result / len(value)def prepare_values():return ["'apple 1'", "orange 2", "'tomato 3'"]def extract_number(s):return int(s.split()[0])def check_input(value):if (value is None) or (len(value) == 0):raise ValueError(value)def remove_quotes(s):if len(s) > 1 and s[0] == "'" and s[-1] == "'":return s[1:-1]return sdef validate_number(number):if number < 0:raise ValueError(number)return numberaverage = find_average(prepare_values())
print("The average is ", average)

调试工作流

def find_average(value):check_input(value)result = 0for s in value:result += validate_number(extract_number(remove_quotes(s)))#1.在此行设置断点return result / len(value)def prepare_values():return ["'apple 1'", "orange 2", "'tomato 3'"]def extract_number(s):return int(s.split()[0])def check_input(value):if (value is None) or (len(value) == 0):raise ValueError(value)def remove_quotes(s):if len(s) > 1 and s[0] == "'" and s[-1] == "'":return s[1:-1]return sdef validate_number(number):if number < 0:raise ValueError(number)return numberaverage = find_average(prepare_values())
print("The average is ", average)

GIT

学习如何在IDE中使用Git集成

快速入门

cat:name: Puss in bootsgender: malebreed: scottish foldpersonality_type: outgoingnessfur_type: short hairedfur_pattern: tabbyfur_colors: [ red, white ]tail_length: longeyes_colors: [ green ]eyes_number: 2ear_number: 2paws_number: 4favourite_things:- boots- sharp sword- awesome hat- black cloakbehavior:- be_cute:condition: wants everyone to come to tendernessactions:- make pretty eyes

项目历史记录

cat:name: Pelmengender: malebreed: sphinxpersonality_type: dominant# long haired, short haired or hairlessfur_type: hairless# solid, tabby or multi-colorfur_pattern: solidfur_colors: [ white ]tail_length: longeyes_colors: [ green ]eyes_number: 2ear_number: 2paws_number: 4favourite_things:- three plaids- pile of clothes- castle of boxes- toys scattered all over the placebehavior:- play:condition: boringactions:- bring one of the favourite toys to the human- run all over the house- eat:condition: want to eatactions:- shout to the whole house- sharpen claws by the sofa- wake up a human in the middle of the night- sleep:condition: want to sleepaction:- bury himself in a human's blanket- bury himself in a favourite plaid

提交

cat:name: Puss in bootsgender: malebreed: scottish foldpersonality_type: outgoingnessfur_type: short hairedfur_pattern: tabbyfur_colors: [ red, white ]tail_length: longeyes_colors: [ green ]eyes_number: 2ear_number: 2paws_number: 4favourite_things:- boots- sharp sword- awesome hat- black cloakbehavior:- be_cute:condition: wants everyone to come to tendernessactions:- make pretty eyes- play:condition: boringactions: [ run after mice or own tail ]

功能分支工作流

cat:name: Oreshekgender: malebreed: mongrelpersonality_type: skittishness# long haired, short haired or hairlessfur_type: short haired# solid, tabby or multi-colorfur_pattern: solidfur_colors: [ black ]tail_length: shorteyes_colors: [ yellow ]eyes_number: 2ear_number: 2paws_number: 4favourite_things:- bunch of candy wrappers- tennis ball- plush mouse- cardboard boxbehavior:- eat:condition: want to eatactions: [quietly ask for food]- sleep:condition: want to sleepactions: [find any place and lie down]

互动式变基

cat:name: Marsygender: femalebreed: martian longhairpersonality_type: impulsivenessfur_type: long hairedfur_pattern: solidfur_colors: [ red ]tail_length: shorteyes_colors: [ red, blue ]eyes_number: 2ears_number: 4paws_number: 4favourite_things:- marsian flowers- two rovers- crumpled Tesla roadsterbehavior:- drive:condition: boringactions:- put stones on the pedals of Tesla roadster- steer standing on hind paws- communicate:condition: want to speak with someoneactions:- turn on one of the rovers- meow "Hmeowston, are meow hmeowing meo?"

变更列表和搁置

cat:name: Marsygender: femalebreed: martian longhairpersonality_type: impulsivenessfur_type: long haired  # debug: check another types (short haired, hairless)#标记此行fur_pattern: solidfur_colors: [ red ]tail_length: shorteyes_colors: [ red, blue ]eyes_number: 2ears_number: 4paws_number: 4favourite_things:-marsian flowers- two rovers- crumpled Tesla roadsterbehavior:- drive:condition: boringactions:- put stones on the pedals- steer standing on hind paws- communicate:condition: want to speak with someoneactions:- turn on one of the rovers- meow "Hmeowston, are meow hmeowing meo?"- eat:condition: hungryactions: [ fry self-grown potatoes ]

使用Git追溯注解

cat:name: Marsygender: femalebreed: martian longhairpersonality_type: impulsivenessfur_type: long hairedfur_pattern: solidfur_colors: [ red ]tail_length: shorteyes_colors: [ red, blue ]eyes_number: 2ears_number: 4paws_number: 4favourite_things:-marsian flowers- two rovers- crumpled Tesla roadsterbehavior:- drive:condition: boringactions:- put stones on the pedals- steer standing on hind paws- communicate:condition: want to speak with someoneactions:- turn on one of the rovers- meow "Hmeowston, are meow hmeowing meo?"

PyCharmLearningProject学习基础相关推荐

  1. Golang学习-基础命令

    链客,专为开发者而生,有问必答! 此文章来自区块链技术社区,未经允许拒绝转载. . Golang学习-基础命令 一.go run 用于运行命令源码文件,只能接收一个命令源码文件以及若干个库源码文件作为 ...

  2. 资源 | Intel发布AI免费系列课程3部曲:机器学习基础、深度学习基础以及TensorFlow基础

    翻译 | AI科技大本营(公众号ID:rgznai100) 校对 | 成龙 编辑 | 明明 Intel于近期发布了三门AI系列的免费课程,分别是关于机器学习基础.深度学习基础.TensorFlow基础 ...

  3. 深度估计相关原理(计算机视觉和深度学习基础)

    今天来和大家介绍一下深度估计涉及到的理论知识点,包括计算机视觉基础和深度学习基础. 一.计算机视觉基础 1.1. 针孔相机模型 相机模型,是指采用一个几何模型来描述三维世界中的坐标点映射到二维图像平面 ...

  4. 清华成果发布 | 广度学习基础计算系统集成平台

    来源:清华成果与知识产权 成果简介 随着国民经济的快速发展,机动车辆增长迅速.路面交通任务日益繁忙,国内交通安全形势面临日益严峻的考验.虽然基础应用系统已经达到了较高的技术和应用水平,但也存在着一些问 ...

  5. 深度学习基础(基本概念、优化算法、初始化、正则化等)

    2020-04-25 16:29:09 引言 深度学习目前已成为发展最快.最令人兴奋的机器学习领域之一,许多卓有建树的论文已经发表,而且已有很多高质量的开源深度学习框架可供使用.然而,论文通常非常简明 ...

  6. 【完结】有三AI阿里云的深度学习基础课程暂时完结,欢迎扩散学习

    2021年3月份有三AI与阿里天池联合推出了深度学习系列课程, 课程内容包括人工智能与深度学习发展背景,深度学习典型应用,卷积神经网络,循环神经网络,生成对抗网络,深度学习开源框架等内容,目前已经基本 ...

  7. [深度学习基础] 深度学习基础及数学原理

    图像分类 (image classification) 问题是指, 假设给定一系列离散的类别(categories)(如猫, 狗, 飞机, 货车, ...), 对于给定的图像, 从这些类别中赋予一个作 ...

  8. 语言的学习基础,100个经典的算法

    POJ上做做ACM的题 语言的学习基础,100个经典的算法 C语言的学习要从基础开始,这里是100个经典的算法-1C语言的学习要从基础开始,这里是100个经典的算法 题目:古典问题:有一对兔子,从出生 ...

  9. C++学习基础八——重载输入和输出操作符

    C++学习基础八--重载输入和输出操作符 一.重载输入操作符的要点: 1.返回值为istream &. 2.第一个参数为istream &in. 3.第二个参数为自定义类型的引用对象( ...

最新文章

  1. 版本控制工具 svn 一
  2. Seaborn初学指南
  3. OpenFOAM程序开发的基本知识(基本术语)
  4. 史上四大“杀人”建筑,烧掉几百亿,却犯低级错误,网友:有钱人的智商,我不懂
  5. JSR 365更新:深入CDI 2.0
  6. Linux上安装ZooKeeper并设置开机启动(CentOS7+ZooKeeper3.4.10)
  7. Android 打造完美的侧滑菜单/侧滑View控件
  8. RiskSense Spotlight:全球知名开源软件漏洞分析报告
  9. 模块化程序设计(多文件编程)介绍
  10. Netlink 0002 -- 什么是Netlink
  11. Eclipse Spring Tool Suite常用配置
  12. 平板电脑可以装python吗_电脑上的应用程序可以装在平板电脑上吗
  13. mac mini u盘安装系统_如何制作U盘启动盘安装操作系统
  14. java对接快递单号查询自动识别api接口,调用代码示例
  15. 安卓结课作业 音乐播放器 视频播放 游戏 附带源码
  16. 火车票能不能选座_12306可以选座位吗 12306怎么选座位方法介绍
  17. QT 度和温度符号的显示(字符编码)
  18. Python爬虫:老兵不死,用数据纪念2019男篮世界杯
  19. docker安装青龙面板薅羊毛(新手教程,大佬可略过)
  20. 网页优化(布局优化、图片优化)

热门文章

  1. 预产期计算器在线计算生男生女计算机,预产期计算器生男生女,太准了
  2. UR机械臂simscape正逆解仿真
  3. ubuntu18.04切换使用指定的无线网卡(开启/禁用)
  4. 服务器禁ping后如何监控网站,韩国服务器的IP禁PING后如何检查网络
  5. 投影仪怎么当电视用?三个办法教会你!
  6. 企业微信设置接收消息的参数,报错“openapi回调地址请求不通过”
  7. 基于Modbus协议的C#串口工具开发
  8. windows10+虚拟机(VMware12.5)+乌班图(ubuntu-18.04.4)+Qt(5.13.2)环境搭建亲测有效
  9. RK3399 LINUX RTL8821CS移植
  10. 串口上升时间标准_自动控制理论中: 上升时间和峰值时间有什么不同