使用pycharm建立项目
在创建项目时,可以选择项目存储的位置,我会选择将代码存储在固定的文件夹中,方便查看和管理。  可以选择为新建的项目起一个独立的空间  在创建好项目之后,可以进行内容的编写,右键选择创建Python File  创建之后,会弹出窗口为内容起一个名字  点击回车进入程序编写界面。
修改一些设置
在进入应用界面后,首先点击File进行一些设置修改,点击settings  会弹出一个窗口,首先选择Font先修改一下字体,可以选择Mono,保证中文不会乱码,同时调节一下字号大小,方便查看代码。  然后点击File and Code Templates,选择在右侧选择Python Script,可以在右侧进行编辑,第一行表示中文编码不会出现乱码,可以加上时间、作者、文件名和应用的软件名,这些设置会在每次新建项目时自动填写。  修改好这些后就可以进行项目编写了。
项目编写
1.注释
单行注释:加#号 多行注释:三个英文单引号 
2.输出
在进行简单的输出时,和Python写法一样 
3.运行
在运行程序时,单击右键选择run,下方会出现运行框,表示运行成功  在选择右上角运行时,注意观察要运行的文件是否与当前文件一致 
4.重命名
如果想对项目文件重命名,可以选中项目文件,单击右键,选择额外factor,然后选择rename,可以修改名称 
5.格式化输出
在需要输出一整段话,但是句子中包含变量时,可以通过占位符占位,然后追加在整个语句后方的方式进行打印输出 在输出十进制的整数时,用占位符%d,在输出字符串时,用%s占位。 当有多个同类型的占位符时,可以再追加时,添加一个%(),将所有的追加按顺序填写在括号中。 
6.连续输出
如果在print中连续写多个输出的话,会自动用空格隔开,如果需要用其他符号进行分隔,可以用sep=’ '进行设置

7.关于换行
在默认情况下,在输出之后会自动换行,可以用end=’ ‘设置 end=’’如果什么都不写,表示不换行 end=’\t’会自动添加一个空格 end=’\n’表示换行 
|