caizigary

2019年2月28日

Python map() 函数

摘要: Python map() 函数 描述 map() 会根据提供的函数对指定序列做映射。 第一个参数 function 以参数序列中的每一个元素调用 function 函数,返回包含每次 function 函数返回值的新列表。 语法 map() 函数语法: 参数 function -- 函数 itera 阅读全文

posted @ 2019-02-28 12:19 caizigary 阅读(180) 评论(0) 推荐(0)

2019年2月10日

Python语言:Day11练习题

摘要: 24、实现一个整数加法计算器:如:content=input('请输入内容:')#如:5+9或5+ 9或5 + 9 25、计算用户输入的内容中有几个十进制小数?几个字母?其他字符? 如:content=input('请输入内容:') #如:asduiaf878123jkjsfd--‐213928*& 阅读全文

posted @ 2019-02-10 10:51 caizigary 阅读(374) 评论(0) 推荐(0)

2019年2月5日

Python语言:Day9练习题及其答案

摘要: 1.使用while循环输出1,2,3,4,5,6, 8,9,10 2.求1-100的所有数之和 3.输出1—100内所有的奇数 4.输出1—100内所有的偶数 5.求1-2+3-4+5…99的所有数的和 6.用户登录,三次重试机会 阅读全文

posted @ 2019-02-05 21:10 caizigary 阅读(331) 评论(0) 推荐(0)

2018年12月14日

C语言:递归函数n!

摘要: #include <stdio.h> long recursion(int n); void main(){ int n; long result; printf("input a integer number:\n"); scanf("%d",&n); result=recursion(n); p 阅读全文

posted @ 2018-12-14 13:06 caizigary 阅读(742) 评论(0) 推荐(0)

C语言:函数嵌套2^2!+3^2!

摘要: #include <stdio.h> long f1(int p); long f2(int q); int main (){ int i = 0; long s = 0; for(i = 2;i <= 3;i++) { s = s + f2(i); } printf("2^2!+3^2!=%ld\ 阅读全文

posted @ 2018-12-14 12:05 caizigary 阅读(510) 评论(0) 推荐(0)

2018年12月10日

C语言:开平方根sqrt程序02

摘要: #include <stdio.h> int sqrt01(int x); void main(void){ int x=49,y; y=sqrt01(x); if(y<0) printf("Error:sqrt return %d\n",y); else printf("The sqrt root 阅读全文

posted @ 2018-12-10 21:54 caizigary 阅读(729) 评论(0) 推荐(0)

c语言:开平方根sqrt程序01

摘要: #include <stdio.h> int sqrt01(int x); void main(void){ int x=49,y; y=sqrt01(x); if(y<0) printf("Error:sqrt return %d\n",y); else printf("The sqrt root 阅读全文

posted @ 2018-12-10 21:51 caizigary 阅读(1072) 评论(0) 推荐(0)

Python语言:下载上证股票数据程序

摘要: from urllib.request import urlretrieve f = open('SHA.csv', 'r')for line in f: data = line.split(',') stock_no = '0' + data[0].strip() start_date = dat 阅读全文

posted @ 2018-12-10 18:29 caizigary 阅读(602) 评论(0) 推荐(0)

C语言:统计数字空格其他字符程序

摘要: #include <stdio.h> int main(){ char t; int num=0; int spac=0; int other=0; int sum=0; printf("Please input:\n"); while(1) { t=getchar(); sum++; if(t>= 阅读全文

posted @ 2018-12-10 18:25 caizigary 阅读(1166) 评论(0) 推荐(0)

导航