python ( pycharm EDU)

Free, easy and professional tool to learn programming with Python

Getting Started for Students

? Take a tour of PyCharm Edu

Overview

This guide aims to help the students get a grip of PyCharm Edu and pass through the initial course of Python programming.

The first start

Having launched PyCharm Edu, you see the Welcome screen first.
Here, choose the very first option Introduction to Python. PyCharm Edu silently creates a project, and opens it.

Now look at the new project:

where (1) is the Project tool window, (2) is the Course Progress tool window, (3) is the Python console,
(4) is the editor that now shows the Python script hello_world.py, and (5) is the Task Description tool window.

To learn what is a tool window and how to handle it, refer to the corresponding sections of the documentation.

As you see, the Project tool window contains the following major entities:

  • Lessons, marked . When a lesson is completed, its icon changes to
    .
  • Tasks, marked . When a task is completed, its icon changes to
  • Python files, marked , and all other file types, supported by PyCharm Edu.
  • Sandbox, where you can create files and folders of your choice.

Creating an educational project

By the way, when you feel yourself better with Python, you can create an educational project yourself.
To do this, just choose File | New Project... on the main menu, and follow the steps of the wizard.

This procedure is described in the corresponding section of this documentation.

As an exercise, let‘s explore the first lesson and fulfil its tasks.

Lesson 1. First Program and Comments

Expand the Introduction lesson .
To do that, click right arrow next to lesson name.
You see the nested tasks :

Click next to the first task name, and see the Python file hello_world.py.
This file is opened in the editor by default. However, if you press F4, this file will open in the editor.

To the right of the editor, there is the Task Description tool window with the task text.

Above the task description, there is the toolbar with the following icons:

  • — click this button to make sure your answer was correct.
  • / — click these buttons to open the previous or next task in the editor
  • — click this button to drop changes to a task and start it anew
  • — click this button to show prompt for the current task.

Executing a task

The editor tab is occupied by a task itself. A task consists
of one or more frames that serve as placeholders for your code — you
need to type your answer inside the placeholder.

In our case, you have to introduce yourself to the world, that is, type your name in the frame:

Before checking the task, you might want to run it — just to see for yourself
how it works. For that, there is a special icon in the left gutter of the editor:

If you click this icon, the current Python script will run and show you its output in the Run tool window:

When ready, click in the Task Description tool window, to check whether the task within a placeholder has been executed correctly:

Yes, you are right! Congrats are well deserved.

By the way, if you click in the Run tool window, the output will disappear. If your attempt was not correct, PyCharm Edu also informs you about it:

As you see in the Project tool window, the correctly executed
task is marked green, while the incorrect task is marked red. Let‘s get
rid of red and repeat the task!

Note that if a task contains more than one placeholder, each
placeholder with correct code becomes green, while a placeholder with
incorrect code becomes red. The entire task will be considered correct
and marked green only when all the placeholders are filled in with
correct code!

Navigating between tasks

As the current task has been successfully executed, let‘s pass to the next one. To do that, click the right
arrow button , or press Ctrl+Right. PyCharm Edu opens the next task in the editor. Note that the
newly opened file that contains a yet untouched code, is underlined with the red curvy line, since there are
syntax errors.

When you enter syntactically valid solution, this red curvy line will disappear.

Clicking the left arrow or pressing Ctrl+Left lets you jump to the previous task.

Starting a task all over again

Suppose now that you‘ve made several attempts to execute a
task, and now there are lots of changes, and you want to start
everything from scratch.

In this case, click , and see how PyCharm Edu returns to the original state of a task:

Getting task hints

If you are not sure what are you supposed to do to fulfil a task, you can always see the task description.
It is always available in the Task Description tool window.

You can also view hints for each placeholder. To do that, place the caret in the answer placeholder and click
:

Navigating between answer placeholders

Suppose now that your task contains several placeholders, and
you have to type something meaningful in each one. You know well enough
the answer to the second question, but you are not sure about the first
one, which now holds the highlight.

No problem — you can start with any question you like better. To do that, press Ctrl+Enter,
and the placeholders of the next question now gets the focus:

Now type your answer here, and then press Ctrl+Enter again to jump to the first frame.

You can also switch between answer placeholders back and forth using Ctrl+Shift+Right/ Ctrl+Shift+Right.

Using Python console

Finally, let‘s try working in the console. Click the tool
window button Python Console. The console starts, allowing you to enter
commands:

Pressing Enter executes the current command. You can use the history
of commands already entered in the console: press up or down arrow keys to navigate through the history.

Note that code completion is available in the Python console.
For example, start typing the keyword ‘type‘ and press Ctrl+Space after the first letters. PyCharm Edu suggests matches:

Code completions after dot and after the opening parenthesis are also available:

Pressing the toolbar button shows you variables used in the current session:

Refer to the section Interactive Console to learn more about the available controls.

How to reset the entire course?

At some point you may want to reset the entire course. There
is no special button or menu entry for that in PyCharm Edu, so you have
to do this manually.

To reset the entire course, follow these steps:

1. On the main menu, choose File | New project...

2. In the dialog box that opens, choose project type Educational.

3. Specify the new directory for your project.
If you are going to reset Introduction to Python, you have to delete the PythonIntroduction folder
(this folder by default resides under your home folder in PycharmProjects/PythonIntroduction)
— and the next time you‘ll click the Introduction to Python option, PyCharm Edu will create a new educational project for you.

That completes the tutorial. You got a head start and now can
further explore the PyCharm Edu and learn Python along the way. We wish
you best of luck!

http://www.jetbrains.com/pycharm/docs/PyCharm_ReferenceCard.pdf

时间: 2024-10-15 04:33:07

python ( pycharm EDU)的相关文章

2.python,pycharm,anaconda之间的区别与联系 - python基础入门

Python环境配置-Pycharm下载/Anaconda安装 中我们已经完成了 Pycharm 和Anaconda 的安装.可能对于刚接触的小伙伴还是比较懵逼的,一会python一会Anaconda一会又特么来了个pycharm,一串接一串英文,特么怎么读都还不知道!!! 一.python是什么 python是一门编程语言,当前比较流程的编程语言有C/C++  .JAVA .Object-C  .PHP等,当然python也是其中之一.每一种编程语言都有自己的语法和规范,要想通过python编

06 windows安装Python+Pycharm+Scrapy环境

windows安装Python+Pycharm+Scrapy环境 一.卸载python环境 卸载以下软件: 二.安装python环境 (1) 安装python开发环境3.6.4,双击运行“python-3.6.4-amd64.exe” 在C盘创建python文件夹,在python文件夹里面创建python_venv文件夹 输入“win+r”,输入cmd,,检查python是否安装成功,是否成功配置环境变量,出现下面情况,表示安装成功. (2)安装python开发工具pycharm双击运行“pyc

Python,PyCharm

Python语言自从20世纪90年代初诞生至今,它逐渐被广泛应用于处理系统管理任务和Web编程.今天就让我们来搭建一个python的开发环境,Windows搭建python开发环境.一切从"Hello world"开始. Python(英语发音:/?pa?θ?n/), 是一种面向对象.解释型计算机程序设计语言,由Guido van Rossum于1989年发明,第一个公开发行版发行于1991年. Python是纯粹的自由软件, 源代码和解释器CPython遵循 GPL(GNU Gene

ubuntu python PyCharm virtualenv

1.安装virtualenv 参照:http://docs.jinkan.org/docs/flask/installation.html 2.PyCharm结合virtualenv开发应用 PyCharm-->New Project -->Pure Python-->Interpreter中的设置中选择Create VirtualEnv选择相应的目录,例如:~/PycharmProjects/pycharm_env/test,PyCharm会依据项目名称在test目录下创建一个与项目名

Python+PyCharm的一些基本设置:安装使用、注册码、显示行号、字体大小和快捷键等常用设置

一 下载与安装 软件下载,软件文档下载:http://www.jetbrains.com/pycharm/download/ 如下图: 官方网站下载:http://www.oschina.net/p/pycharm 此外本人提供网盘下载,这个版本无需破解,下载安装即可使用:http://pan.baidu.com/s/1c2INnRM 二 注册码 注册码转自:http://www.cnblogs.com/zdz8207/p/python_learn_note_18.html PyCharm4注册

linux下python+pycharm安装

一.安装python3.5 默认情况下,linux下是默认使用2.x版本的,现在我们要安装3.x版本,具体操作如下 1.去官网下载安装包.(这里我下载的是.tgz版本) 2.用命令解压安装包 tar -zxvf +压缩包 3.进入解压后的文件 cd + 解压后的文件夹 4../configure --prefix=/usr/local/python3.5 重定向到该文件夹下进行编译 5.make 6.make install 7.可以进入到安装目录查看是否有安装正确. 8.使用echo $PAT

Python & PyCharm & Django 搭建web开发环境

一.安装软件 1.安装 Python 2.7.PyCharm.pip(Python包管理工具).Django ( pip install Django) 二.部署 1.PyCharm 新建Django工程 完成后,其目录如下: 子目录MyDjangoProject下表示工程的全局配置,分别为setttings.py.urls.py和wsgi.py,其中setttings.py包括了系统的数据库配置.应用配置和其他配置,urls.py则 表示web工程Url映射的配置. 子目录student则是在

Selenium+Python+Pycharm进行自动化测试

最近研究新的自动化测试方法,QTP已经用的比较熟练,待开发新的方法,这里做个记录和大家共勉. 1.首先肯定是配置环境了,一步一步来吧,先下载需要的工具: 下载一个python的环境,我这里用的Python3.4,一会我上传上来,大家可以直接下载.最好用3.4以及以上的版本,这样可以不用pip单独安装什么的,可以联网直接安装selenium了. 安装完Python后可以在线进行selenium安装了,首先cmd进入到Python的scripts目录,一般是这样:cd C:\Python34\Scr

python, pycharm, virtualenv 的使用

创建虚拟环境,一次安装多个库 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "Helvetica Neue"; color: #454545 } p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "Helvetica Neue"; color: #454545; min-height: 14.0px } p.p3 { margin: 0.0px 0.0