3-程序设计思想与方法-2.pptVIP

  • 7
  • 0
  • 约5.33千字
  • 约 45页
  • 2016-12-09 发布于重庆
  • 举报
3-程序设计思想与方法-2

写一个简单的程序 软件开发过程 程序实例:温度转换 程序的构件 程序实例:利息计算 写一个简单的程序 软件开发过程 程序实例:温度转换 程序的构件 程序实例:利息计算 算法设计 将完成任务的步骤分解成计算机能完成的动作 伪代码写的算法: 输入摄氏度:celsius 计算华氏度:fahrenheit = 9 / 5 celsius + 32 显示输出:fahrenheit Python程序 # convert.py # convert Celsius temps to Fahrenheit # by: Suzie Programmer def main(): celsius = input(What is the Celsius temperature? ) fahrenheit = 9.0 / 5.0 * celsius + 32 print The temperature is, fahrenheit, degrees Fahrenheit.” main() 写一个简单的程序 软件开发过程 程序实例:温度转换 程序的构件 程序实例:利息计算 程序的构成 各种名字:main、 celsius等 输入: celsius = input(What is the Celsius temperature? ) 表达式: 9.0 / 5.0 * celsius + 32 赋值: fa

文档评论(0)

1亿VIP精品文档

相关文档