- 浏览: 117830 次
- 性别:
- 来自: 武汉
文章分类
最新评论
# 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 1281<script>function StorePag ... -
一个简单的python代理服务器源码分析
2009-05-20 00:29 1418<script>function StorePag ... -
python起步
2009-05-21 00:15 585<script>function StorePag ... -
urllister.py源码分析
2009-05-22 00:08 1042<script>function StorePag ... -
fibonacci.py源代码分析
2009-05-22 23:24 612<script>function StorePag ... -
builddialectexamples.py源代码分析
2009-05-25 00:05 521<script>function StorePag ... -
piglatin.php源代码分析
2009-05-25 22:58 681<script>function StorePag ... -
plural.py源代码分析
2009-05-26 22:28 548<script>function StorePag ... -
regression.py源代码分析
2009-05-27 21:33 769<script>function StorePag ... -
apihelpertest.py源代码分析
2009-05-28 23:47 513<script>function StorePag ... -
argecho.py源代码分析
2009-05-30 00:44 594<script>function StorePag ... -
soundex.py源代码分析
2009-05-31 01:58 536<script>function StorePag ... -
plural1.py源代码分析
2009-05-31 22:27 585<script>function StorePag ... -
toolbox.py源代码分析
2009-06-01 23:00 548<script>function StorePag ... -
python打印变量的标识符、类型和值
2009-06-03 22:44 2110<script>function StorePag ... -
stringFormatting.py源代码分析
2009-06-04 23:49 485<script>function StorePag ... -
operator.py源代码分析
2009-06-05 23:12 539<script>function StorePag ... -
average.py源代码分析
2009-06-07 00:20 499<script>function StorePag ... -
square.py源代码分析
2009-06-08 00:05 592<script>function StorePag ... -
left.php源代码分析
2009-06-09 01:06 955<script>function StorePag ...
相关推荐
.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 ...
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文件夹相匹配
在Python程序设计语言中,表示整除的符号是( ) A./ B.% C.mod D.// 3.Python语言源代码程序编译后的文件扩展名为( ) A..py B..c C..java D..c++ 4.关于Python语句P = –P,以下选项中描述正确的是( ...
->leet-twosum.py :此代码返回两个数字(来自列表)的索引,其总和等于给定的目标数字。 使用的技术- Python3。 来源- leetcode.com ->leetcode-reverse_integer.py :此代码返回 32 位整数的反转。 使用的技术- ...
在撰写本文时,您必须在源代码中指定这些文件的路径。 对于Java版本,路径在SubSumBase.java中,对于Python版本,路径在subsum.py和subsum_clustering.py中。 同时使用几种相似性度量 同时指定多个相似性度量时,...
克里斯·康兰(Chris Conlan)的Fast Python(2020)源代码 可以购买平装本。 代码配置文件 以下代码概要文件可以作为独立脚本运行。 它们可能取决于也可能不取决于随附书中提供的解释。 二进制搜索: 字典结构:...
安装最新的转换器源代码:pip3 install git + 安装相关软件包:pip3 install -r required.txt 从原始数据生成csv文件:python3 generate_csv.py 训练模型:python3 ./run_seq2seq.py --model_name_or_path t5-...
Matlab代码sqrt 从零开始的线性回归 介绍 任务是在给定数据上实施和训练线性回归模型,以预测住房价格。 环境 MATLAB ...新数据将保存在文件(data.csv)中,并随源代码一起提供。 数据头 下表中描述了给
源数据 Sourcedata可帮助您生成包含从python计算得出的值的源文件。 它可以用于针对python实现测试其他语言的代码。 C ++演示 假设logsumexp_testgen.py包含以下内容: import math import sourcedata @ sourcedata...
标题、题目内容、最近通过代码 spider.py 包含函数 login4cookies ,用于登录并返回登录状态的所有cookies。 根据提示输入登录所需的用户名和密码。 s_spider.py 根据提示输入需要爬取题库的url, 等待爬取完毕,...
} 有条件循环 private void button1_Click(object sender, System.EventArgs e) { int sum=0; int x=0; while ((sum) & (x)) { x++; sum+=x; } string s2=Convert.ToString(x); MessageBox.Show(s2); } 运行显示 14...