- 浏览: 123866 次
- 性别:
- 来自: 武汉
-
文章分类
最新评论
# Fig. 2.7: fig02_07.py
# Simple addition program.
# prompt the user for input
integer1 = raw_input( "Enter first integer:\n" ) # read a string
integer1 = int( integer1 ) # convert the string to an integer
integer2 = raw_input( "Enter second integer:\n" ) # read a string
integer2 = int( integer2 ) # convert the string to an integer
sum = integer1 + integer2 # assignment of sum
print "Sum is", sum # print sum
##########################################################################
# (C) Copyright 2002 by Deitel & Associates, Inc. and Prentice Hall. #
# All Rights Reserved. #
# #
# DISCLAIMER: The authors and publisher of this book have used their #
# best efforts in preparing the book. These efforts include the #
# development, research, and testing of the theories and programs #
# to determine their effectiveness. The authors and publisher make #
# no warranty of any kind, expressed or implied, with regard to these #
# programs or to the documentation contained in these books. The authors #
# and publisher shall not be liable in any event for incidental or #
# consequential damages in connection with, or arising out of, the #
# furnishing, performance, or use of these programs. #
##########################################################################
发表评论
-
一个完整的php项目示例
2009-05-19 13:30 1325<script>function StorePag ... -
一个简单的python代理服务器源码分析
2009-05-20 00:29 1442<script>function StorePag ... -
python起步
2009-05-21 00:15 618<script>function StorePag ... -
urllister.py源码分析
2009-05-22 00:08 1081<script>function StorePag ... -
fibonacci.py源代码分析
2009-05-22 23:24 634<script>function StorePag ... -
builddialectexamples.py源代码分析
2009-05-25 00:05 542<script>function StorePag ... -
piglatin.php源代码分析
2009-05-25 22:58 708<script>function StorePag ... -
plural.py源代码分析
2009-05-26 22:28 586<script>function StorePag ... -
regression.py源代码分析
2009-05-27 21:33 809<script>function StorePag ... -
apihelpertest.py源代码分析
2009-05-28 23:47 543<script>function StorePag ... -
argecho.py源代码分析
2009-05-30 00:44 633<script>function StorePag ... -
soundex.py源代码分析
2009-05-31 01:58 567<script>function StorePag ... -
plural1.py源代码分析
2009-05-31 22:27 617<script>function StorePag ... -
toolbox.py源代码分析
2009-06-01 23:00 577<script>function StorePag ... -
python打印变量的标识符、类型和值
2009-06-03 22:44 2152<script>function StorePag ... -
stringFormatting.py源代码分析
2009-06-04 23:49 512<script>function StorePag ... -
operator.py源代码分析
2009-06-05 23:12 584<script>function StorePag ... -
average.py源代码分析
2009-06-07 00:20 527<script>function StorePag ... -
square.py源代码分析
2009-06-08 00:05 630<script>function StorePag ... -
left.php源代码分析
2009-06-09 01:06 987<script>function StorePag ...
相关推荐
这里的"sum.py"显然是一个Python脚本,它包含了特定的功能,可能是计算总和或者执行某种逻辑。"构建好的exe目录"指的是使用Python打包工具(如PyInstaller、cx_Freeze等)将Python代码转换为Windows操作系统下的可...
.py,数列还原.py,数字翻转.py,数字和为sum的方法数.py,数字游戏.py,素数对.py,统计回文.py,下厨房.py,小易喜欢的单词.py,星际穿越.py,幸运的袋子.py,优雅的点.py,招商银行.py,字符串中找出连续最长的数字串.py,最大...
Using the sum function. range_function.py Opening a file. opening_a_file.py Writing to a file. writing_to_a_file.py Chapter 10 Copying objects (example 1). copying_objects1.py Copying objects ...
在这个场景中,我们关注的是一个名为“c_sum_py”的Python库,其版本为0.4.0,打包格式为tar.gz,这通常意味着它是源代码形式的发布。 “c_sum_py”这个库的名字暗示了它可能将C语言的力量引入到Python中,可能是...
这个`.whl`文件是Python的轮子(Wheel)格式,是一种预编译的二进制包,可以直接在Python环境中安装,无需编译源代码,提高了安装效率。 **Python Wheel格式** Python Wheel是Python社区推荐的一种分发Python软件...
`.whl`文件是一种预编译的Python分发格式,使得用户能够更快速、更容易地安装库,而无需通过编译源代码。 “mitosheet”这个名字暗示了它可能与电子表格处理有关,可能是为了简化数据操作,类似于Google Sheets或...
4.testdjango: Django框架基本文件 5.user:代码核心文件 ①migrations: 迁移文件,Django后端数据库 ②admin.py: 后端创建的类 ③models.py: 模式 ④views.py: 映射文件,也是核心代码文件。所有前后端操作基本都...
使用方法 1、将需要生成MD5值的文件放至dist/files/文件夹下 2、点击dist目录下md5sum.exe ...3、若想使用源代码,需要将MD5文件拷贝两份,保证md5sum.py目录files文件夹以及它上一级files文件夹相匹配
在给定的压缩包"twoSum0.zip"中,包含了一个名为"twoSum0.py"的Python源代码文件。从标题和文件名可以推测,这个程序可能与经典的"两数之和"问题有关,这是一个常见的编程面试题。下面将详细讨论这个问题、其解决...
用户不仅可以自由使用,还能查看源代码学习编程技巧,甚至参与到项目中,贡献自己的代码。 综上所述,`countlines.py`是一个实用的Python脚本,通过简单高效的代码实现了文本文件行数统计功能。它不仅适用于日常的...
correct += (predicted == labels).sum().item() print('Accuracy of the model on the test images: {} %'.format(100 * correct / total)) ``` 通过上述步骤,你将能够在PyTorch中实现VGG16模型,并对CIFAR-10...
->leet-twosum.py :此代码返回两个数字(来自列表)的索引,其总和等于给定的目标数字。 使用的技术- Python3。 来源- leetcode.com ->leetcode-reverse_integer.py :此代码返回 32 位整数的反转。 使用的技术- ...
资源下载一、资源简介本资源包包含基于贪心算法、蛮力法和动态规划法解决分数背包问题和0-1背包问题的Python源码及项目说明。通过这些算法的实现,帮助用户理解不同算法在解决同一类问题上的差异和优劣。二、资源...
`spacy_summarizer.py`中的代码可能包含了基于Spacy的文本理解算法,如TF-IDF或TextRank,这些算法能够识别出文本中的重要句子。 - **Nltk**: Nltk是Python中的另一个经典自然语言处理库,提供了多种文本摘要方法...
在压缩包文件"the_sum_of_prime"中,可能包含的源代码文件可能有以下结构: 1. `prime_counter.py`: 主要的Python代码,包含计算素数个数的函数。 2. `test_prime_counter.py`: 单元测试文件,用来验证`prime_...
在本篇内容中,我们将基于提供的标题“py源码实例excel处理实例求和结果写入单元格”以及描述“py源码实例自动办公excel处理实例(求和结果写入单元格)提取方式是百度网盘分享地址”,来深入探讨Python在处理Excel...
**MOSSE(Minimum Output Sum of Squared Error)追踪算法是一种视觉目标追踪方法,它基于卡尔曼滤波器和自适应阈值的概念。在MATLAB环境中实现MOSSE跟踪器,可以帮助开发者和研究者理解其工作原理并进行相关实验。*...
通常,这个文件解压后会包含该Python库的源代码、元数据文件如setup.py(用于构建、安装和打包Python项目)、README文档、测试用例以及其他相关资源。 综合以上信息,我们可以推测girder-hashsum-download是一个...
Whisper-0.9.9.tar.gz文件就是这个库的源代码包,用于构建和安装在Python环境中。 Carbon是Graphite的数据收集代理,负责接收来自各种源的度量数据,然后将其存储到Whisper数据库中。Carbon包含三个主要子组件:...
源代码文件通常位于`src`或`girder_hashsum_download`这样的子目录下,这些文件包含了库的核心功能。 在实际使用girder-hashsum-download之前,开发者需要先将其安装到本地环境中。这可以通过Python的包管理工具pip...