当前位置: 首页 > news >正文

申请域名建立网站/电商运营主要做什么

申请域名建立网站,电商运营主要做什么,潍坊网站建设 潍坊做网站,做网站的费用我担心的是我在johnzelle的《Python编程:计算机科学导论》(第二版)中为练习编写的代码的有效性。在上面写着:Write a program that approximates the value of π by summing the termsof this series: 4/1 - 4/3 4/5 - 4/7 4/9 - 4/11 ... The progr…

我担心的是我在johnzelle的《Python编程:计算机科学导论》(第二版)中为练习编写的代码的有效性。在

上面写着:Write a program that approximates the value of π by summing the terms

of this series: 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ... The program

should prompt the user for n, the number of terms to sum, and then

output the sum of the first n terms of this series. Have your program

subtract the approximation from the value of math.pi to see how

accurate it is.

以下是我所做的:# pi_approximation

# Program which approximates the value of Pi by summing the terms of

# this series: 4/1 - 4/3 + 4/5 - 4/7

import math

def main():

print("Welcome to Pi approximation!\n")

n = int(input("Enter the number of terms to sum: "))

approx = 0

for i in range(1, n+1, 2):

approx += 4 / i - 4 / (i+2)

print("Approximate value of pi is: " + str(approx))

print("Deviation from Pi is: " + str(math.pi - approx))

main()

我使用的是python3.6。在

http://www.jmfq.cn/news/5141629.html

相关文章:

  • 怎么给自己喜欢的人做网站/直通车推广技巧
  • wordpress 维基主题/南宁seo推广外包
  • 深圳pc端网站开发/搜索引擎营销的常见方式
  • 青羊区定制网站建设报价/网络营销策划推广公司
  • 江阴做网站/关键词的作用
  • 海尔公司的网站建设/厦门网站关键词推广
  • 编程和做网站有关系吗/百度网盘官网下载
  • 手机怎么制作网站教程/深圳网络推广培训学校
  • 做任务免费得晋江币网站/百度号码认证申诉平台
  • 2019建设摩托官方网站/宁波seo教程
  • 58网页版登录打开/长沙专业seo优化推荐
  • 洛阳洛龙区网站建设/网站的seo是什么意思
  • 长治政府网官网/优化关键词排名工具
  • 高邑网站建设/武汉seo招聘网
  • 行业顶级域名com/免费发布网站seo外链
  • 海口市住房和城乡建设局网站/海外推广渠道都有哪些
  • 网站的风格设计有哪些/sem优化策略
  • 西安优化网站技术/深圳百度推广代理
  • 网站做不做301/线上推广平台有哪些
  • 网站图表怎么做的/新闻网最新消息
  • 大网站设计/app数据分析软件
  • 顺义网站做的比较好的公司/壹起航网络推广的目标
  • 512内存做网站/互联网营销成功案例
  • 网站建设需要哪些东西/接广告赚钱的平台
  • w78企业网站后台怎么做/电商网站建设教程
  • 找聊城做网站/东莞网站排名提升
  • 电子商务网站面临的安全隐患/网站推广策划思路的内容
  • 公司企业网站建设的建站流程解析/拉新注册app拿佣金
  • adobe 网站制作软件有哪些/中国站长站
  • 沈阳网站建设公司怎么样/百度官方推广