摘要: NCRE_Python Day3 1> 无限循环可以实现遍历循环的功能 2> 无限循环不需要提前确定循环次数 3> Ctrl+C中断python程序运行 4> random.uniform(a,b) 生成[a,b]之间的随机小数 5> print(pow(3,0.5)*pow(3,0.5)==3)F 阅读全文
posted @ 2021-09-08 17:03 jyyofficial 阅读(369) 评论(0) 推荐(0)
摘要: NCRE_Python Day2 1> Python没有提供浮点数二进制八进制等的表示方式,浮点数不可以用二进制八进制等表示方式 2> Python语言的浮点数必须带小数部分 3> 复数类型中的实部和虚部都是浮点类型 4> divmod函数返回当参数 1 除以参数 2 时包含商和余数的元组 5> c 阅读全文
posted @ 2021-09-05 10:34 jyyofficial 阅读(40) 评论(0) 推荐(0)
摘要: NCRE_Python Day1 鸽了这么久,终于开始进行复习了,加上之前的一些基础,我想这次一定能考一个好成绩的。已经忘了好多了,那么就在这里记录一下复习历程吧。 1> Python 3.5 版本的保留字总数是35. 2> Python保留字 3> Python字符串列表取值 正向:从左导右索引默 阅读全文
posted @ 2021-09-02 20:58 jyyofficial 阅读(642) 评论(0) 推荐(1)
摘要: 1.在任务处点击Anaconda Prompt 2.进入目标Python环境>conda activate 环境名 3.使用PyPI安装函数库(已更改为ustc源)>pip install 环境名 阅读全文
posted @ 2021-06-07 20:09 jyyofficial 阅读(40) 评论(0) 推荐(0)
摘要: C Primer Plus 9 函数 Promgraming Test (1)设计一个函数min(x,y)返回两个double类型值中的最小值。 #include<stdio.h>double min(double x,double y);int main(void){ double d1,d2; 阅读全文
posted @ 2021-06-07 20:00 jyyofficial 阅读(276) 评论(0) 推荐(0)
摘要: C Primer Plus 8 数据输入/输出和输入验证 Promgraming Test (1)在遇到EOF之前,作为字符流读取输入,要求打印每个输入字符以及其对应的ACSII十进制 #include<stdio.h>int main(void){ int counter = 0; char ch 阅读全文
posted @ 2021-05-31 21:03 jyyofficial 阅读(105) 评论(0) 推荐(0)
摘要: C Primer Plus 7 控制语句——分支与跳转 (1)编写一个程序,读取八个整数,并存入整型数组,倒序打印。 #include<stdio.h>#include<math.h>#include<stdlib.h>​int main(void){ int data[8]; printf("En 阅读全文
posted @ 2021-05-08 16:39 jyyofficial 阅读(405) 评论(0) 推荐(0)
摘要: C Primer Plus 6 一、C控制语句 循环 1、编程练习 (1)嵌套循环,打印字符。 #include<stdio.h>int main(void){ int i,j; for(i = 1;i<=5;i++){ for(j = 0;j<i;j++) printf("$"); printf( 阅读全文
posted @ 2021-05-05 20:46 jyyofficial 阅读(54) 评论(0) 推荐(0)
摘要: C Primer Plus 4 一、字符串和格式化输入输出 1.前导程序 \#include<stdio.h>​ \#include<string.h> *//提供strlen()函数原型*​ \#define DENSITY 62.4 *//人体密度*​ \#include<windows.h>​ 阅读全文
posted @ 2021-05-05 12:29 jyyofficial 阅读(402) 评论(0) 推荐(0)
摘要: C Primer Plus 5 一、运算符、表达式和语句 1、编程练习 (1)编写一条程序,把用分钟表示的时间换成用小时和分钟表示的时间。使用#define或者const创建一个表示60的符号常量或者const常量。通过while循环让用户重复输入值,直到小于等于0才停止循环。 #include<s 阅读全文
posted @ 2021-05-05 12:28 jyyofficial 阅读(79) 评论(0) 推荐(0)