专业英语笔记(Install and Use PyCharm)

本文回忆了作者初学编程的经历,并介绍了如何使用Python编写一个简单的猜数字游戏。文章引导读者从零开始设置开发环境,使用PyCharm进行编程,并解释了输入输出及基本运算的实现。

This time we will try to write a python program: number-guessing game.

Every programmer has a story about how they learned to write their first program. I started learning as a child when my father was working for Digital Equipment Corporation, one of the pioneering companies of the modern computing era. I wrote my first program on a kit computer my dad had assembled in our basement. The computer consisted of nothing more than a bare motherboard connected to a keyboard without a case, and it had a bare cathode ray tube for a monitor. My initial program was a simple number guessing game, which looked something like this:

I'm thinking of a number! Try to guess the number I'm thinking of: 25
Too low! Guess again: 50
Too high! Guess again: 42
That's it! Would you like to play again? (yes/no) no
Thanks for playing!


There are some good IDEs for Python development, such as Geany and PyCharm.
Here we are going to use PyCharm as the IDE to write Python programs.
First download PyCharm from its official website: http://www.jetbrains.com/products.html#lang=python

Click the DOWNLOAD button:


Here we choose the Community Edition and click the DOWNLOAD button:




Double click the installer file and enter the installation wizard:


Click the Next button:


Here we don't change the destination folder and use the default value.








Customize Pycharm as follows:








Create a Python package named net.hw.test in this project.




Now we create a new Python program named addition.py.




Now we can write codes in this file.

The return value of input() function is of str type, so we have to use int() function to convert string to integer.

sum = a + b

Math English: sum equals a plus b  or  sum is equal to a plus b

Computer English: Let sum be equal to a plus b.  |  Assign a plus b to sum.



要在PyCharm中更换谷歌(Google)代理,您可以按照以下步骤操作: 1. 首先,确保您已经安装了最新版本的pip。你可以在终端运行命令 `pip install --upgrade pip` 来升级pip的版本。 2. 接下来,打开PyCharm,并打开你的项目。 3. 在PyCharm的顶部菜单中,选择 "File" -> "Settings"。 4. 在弹出的设置对话框中,选择 "Project: your_project_name",然后选择 "Python Interpreter"。 5. 在Python Interpreter设置页面的右侧,点击齿轮图标,选择 "Add"。 6. 在弹出的对话框中,选择 "System Interpreter",然后选择您想要使用的Python解释器。 7. 单击 "OK" 保存设置。 8. 在Python Interpreter设置页面的左上角,点击齿轮图标,选择 "Show All"。 9. 在搜索框中输入 "google",然后选择 "google" 相关的包。 10. 单击 "Install Package" 按钮,等待安装完成。 11. 安装完成后,关闭设置对话框。 现在,您已经成功更换了PyCharm中的谷歌代理。您可以使用新的代理地址来访问谷歌。 [注:以上步骤是假设您要在PyCharm中更换谷歌的代理地址,以便能够访问谷歌服务。如果您的问题是关于更换谷歌搜索引擎,请提供更多详细信息以便我能够给出准确的答案。] 引用: - 问题解决了。更换后记得把原来的代理地址删除掉,最好再升级一下pip包,我这边每次新建项目pip的版本都是10.1,最好升级成最新的,更换代理后直接pycharm里升级即可。 - 像往常一样,用pycharm新建了一个项目,用pycharm安装依赖包的时候,安装失败。报Make sure that you use the correct version of 'pip' installed for your Python interpreter located at。 - 谷歌师兄的leetcode刷题笔记谷歌音乐助手 一个简单的应用程序,可帮助管理您的 All Access 图书馆。有一些严重的缺点,因为:这是我第一次写Python。我在拖延的几个小时内写了这篇文章!我很高兴接受任何拉取...。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

酒城译痴无心剑

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值