导航菜单
首页 >  python报考条件  > python认证考试

python认证考试

前言: 进入python institue官网查看认证内容和考试: 在这里插入图片描述 购买考试凭据: 在这里插入图片描述

在这里插入图片描述

在这里插入图片描述 PCEP的政策: 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述

PCEP的考试大纲: 在这里插入图片描述

Python作为目前业界最受欢迎的语言,是大部分数据分析相关从业人员的一项必备技能。对于很多0基础的小白,经常会问的问题就是,如何快速学习Python。在这里给大家介绍一个Python入门级的考试:PCEP-30-01 Exam。

文章目录证书介绍考试基本情况考试准备材料备考大纲*Section 1:Computer Programming and Python Fundamentals(18%)*第一节:计算机编程和Python基础PCEP-30-02 1.1 – Understand fundamental terms and definitions理解基本术语和定义(18%)interpreting and the interpreter, compilation and the compiler解释和解释器,编译和编译器lexis, syntax, and semantics词汇、语法和语义PCEP-30-02 1.2 – Understand Python’s logic and structure理解Python的逻辑和结构keywords关键字instructions说明indentationcomments:#是Python里的注释PCEP-30-02 1.3 – Introduce literals and variables into code and use different numeral systems在代码中引入文字和变量,并使用不同的数字系统Boolean, integers, floating-point numbers:/(除以)的结果永远是浮点数,注意与//(double slash)结果的区别scientific notation科学记数法stringsbinary, octal, decimal, and hexadecimal numeral systems二进制,八进制,十进制和十六进制数字系统variables变量naming conventions命名规范implementing PEP-8 recommendations实现PEP-8建议PCEP-30-02 1.4 – Choose operators and data types adequate to the problem选择适合问题的操作符和数据类型numeric operators: ** * / % // + –:数值返回运算符,考前一定要熟悉运算符号的优先顺序,比如&的优先级高于|string operators: * +字符串运算符assignment and shortcut operators赋值和快捷操作符unary and binary operators:操作符:一元和二元,优先级和绑定:注意exponential operator指数运算符用的是right-sided binding右侧绑定,也就是从右至左的顺序priorities and binding优先级和绑定bitwise operators: ~ & ^ | >逐位运算符:~&^|:按位运算符号,注意按位运算是按照参与的数据进行二进制位表达之后的运算Boolean operators: not, and, or布尔操作符:not, and, orBoolean expressions布尔表达式relational operators ( == != > >= < 是解读,#python institue test题是官网教程中test部分的考题。

*Section 1:Computer Programming and Python Fundamentals(18%)*第一节:计算机编程和Python基础

Objectives covered by the block (7 exam items)模块涵盖的目标(7个考试项目)

PCEP-30-02 1.1 – Understand fundamental terms and definitions理解基本术语和定义(18%) interpreting and the interpreter, compilation and the compiler解释和解释器,编译和编译器

python institue test:解释器interpreter是一条一条的解释执行源语言,解释器是一种计算机程序,它直接执行由编程语言或脚本语言编写的代码,并不会把源代码预编译成机器码。比如php,postscritp,javascript就是典型的解释性语言。 编译器compiler是把源代码整个编译成目标代码,执行时不在需要编译器,直接在支持目标代码的平台上运行,这样执行效率比解释执行快很多。比如C语言代码被编译成二进制代码(exe程序),在windows平台上执行。

lexis, syntax, and semantics词汇、语法和语义

python institue test:构成语言的四大基本要素:an alphabet,a lexis,a syntax,and semantics字母表、词汇、语法和语义

PCEP-30-02 1.2 – Understand Python’s logic and structure理解Python的逻辑和结构 keywords关键字 instructions说明 indentation comments:#是Python里的注释 PCEP-30-02 1.3 – Introduce literals and variables into code and use different numeral systems在代码中引入文字和变量,并使用不同的数字系统 Boolean, integers, floating-point numbers:/(除以)的结果永远是浮点数,注意与//(double slash)结果的区别

" / “就表示 浮点数除法,返回浮点结果;” // "表示整数除法。 python Institue test:integer and floating-point之间最重要的区别在于:they are stored differently in the computer memory

scientific notation科学记数法

科学计数法:10^x次方,用e来表示

#python insitute test题如下:x = 1e+3#+加号指10次方x1 = 1e-3 #-减号是指0.1次方x2 = 1e+03x3 = 1e+003x4 = 1E+3#e不分大小写print(x)print(x1)print(x2)print(x3)print(x4)执行结果如下:1000.00.0011000.01000.01000.0 strings binary, octal, decimal, and hexadecimal numeral systems二进制,八进制,十进制和十六进制数字系统

numeral systems数制:这部分相对来说是大部分人可能容易忽略的基础知识,注意八进制,十六进制的表达方法,以及decimal十进制和binary二进制之间互相的转换

二进制(Binary),八进制(Octal),十进制(Decimal),十六进制(Hexadecimal) 八进制,十六进制的表达方法: 1.八进制数是一种逢八进一的计数体制,基数是8,用0~7表示,如077。 2.八进制数以数字0开头。 3.十六进制数是一种逢十六进一的计数体制,基数是16,用09,AF表示,如0xFF或0XFF。 4.十六进制数以数字0和字母x的组合0x或0X开头。其中字母x是不区分大小写的,即0x与0X等价。 python institue test:八进制Octal简写是O,十六进制Hexadecimal简写是0x

decimal十进制和binary二进制之间互相的转换: 二进制变十进制转换原则:把二进制数写成按权展开的多项式加法,然后求和,即可将二进制转化为十进制数。 在这里插入图片描述 十进制变为二进制:1.整数部分转换原则:除2取余法,将所得余数倒着写。即将十进制数反复除以2,取余数,直到商为0为止,最后将所得余数倒着排列,即为十进制数转换为二进制数。 在这里插入图片描述 2.小数部分的转换原则:乘2取整法,顺着写,即将十进制小数部分不断乘以2取整,直到小数位零,或到达有效精度为止,最先得到的数位最高位,最后得到的整数位最低位。下面我们看看如何将0.6875转换为十进制数。 在这里插入图片描述

variables变量 naming conventions命名规范 implementing PEP-8 recommendations实现PEP-8建议 PCEP-30-02 1.4 – Choose operators and data types adequate to the problem选择适合问题的操作符和数据类型 numeric operators: ** * / % // + –:数值返回运算符,考前一定要熟悉运算符号的优先顺序,比如&的优先级高于|

以下表格的算数优先级由高到最低顺序排列

优先级高到低类型运算符描述内部优先级1算数运算符**幂(最高优先级)运算从左到右(幂>乘除取余数整数>加减)2算数运算符*、/、%、//乘、除、取余数、取整数运算从左到右(幂>乘除取余数整数>加减)3算数运算符+、-加法、减法运算从左到右(幂>乘除取余数整数>加减)4比较运算符<=、<、>、>=比较运算从左到右5等于运算符==、!=等于不等于运算从左到右6赋值运算符=、%=、/=、//=、-=、+=、*=赋值运算从左到右7逻辑运算符not、and 、or不、或、和() > not > and > or

记忆:双臂等腹肌 难点1:逻辑运算是最低的,而且之间还是优先级,not,and,or不合伙

#python institue test:

难点2:运算,从右到左,如 12**3=1

#python institue test:a = 1 ** 2 ** 3print(a)b = 2 ** 2 ** 3print(b)执行结果如下:1256

易错:/是除,//比/多/是整除,%长得就奇怪,那就是取余数了;/是除,得到若是整数是X.0

#python insitute test题如下:x = int(input())y = int(input())x = x % y#%与//易混,%取余数,//取整除,x=3%2=1x = x % y#x=0%2=0y = y % xprint(y)执行结果如下:3#人为输入的,不是输出结果2#人为输入的,不是输出结果0 #python insitute test题如下:x = 1 // 5 + 1 / 5print(x)执行结果如下:0.2 #python insitute test题如下:x = int(input())y = int(input())x = x % yx = x % y#3除以4,商0,余3y = y % x#4除以3,余1print(y)执行结果如下:11 #人为输入4#人为输入1 #python insitute test题如下:x = int(input())y = int(input())x = x // yy = y // xprint(y)执行结果如下:2 #人为输入4#人为输入y = y // xZeroDivisionError: integer division or modulo by zero #python insitute test题如下:x = int(input())y = int(input())x = x / yy = y / xprint(y)执行结果如下:2 #人为输入4#人为输入8.0 #python insitute test题如下:x = 1 / 1print(x)执行结果如下:1.0 #python insitute test题如下:y = 2 + 3 * 5.print(y)执行结果如下:17.0 #python insitute test题如下:y = 2 + 3 * 5.print(Y)执行结果如下:print(Y)NameError: name 'Y' is not defined string operators: * +字符串运算符 #python insitute test题如下:x = input()y = input()print(x + y)执行结果如下:2#人为输入4#人为输入24 assignment and shortcut operators赋值和快捷操作符 unary and binary operators:操作符:一元和二元,优先级和绑定:注意exponential operator指数运算符用的是right-sided binding右侧绑定,也就是从右至左的顺序 priorities and binding优先级和绑定 bitwise operators: ~ & ^ | >逐位运算符:~&^|:按位运算符号,注意按位运算是按照参与的数据进行二进制位表达之后的运算 按位运算符描述原理简单的例子运算过程&按位与运算符如果两个位均为1,Python按位运算符将返回1,否则返回010&7 = 210二进制为1010,7二进制为111,1010&0111=0010十进制为2\按位或运算符如果任何位为1,Python按位或运算符将返回1。如果两个位均为0,则它​​将返回010 /7 = 151010/0111=1111十进制为15^按位XOR运算符如果一位为0,另一位为1,则Python按位XOR运算符将返回1。如果两个位均为0或1,则它将返回0。10 ^ 7 = 131010 ^ 0111=1101十进制为13〜按位补码运算符数字’A’的补码等于-(A + 1)〜10 = -1110=1010=-(1010+1)=-1011十进制为-11> 1 =1010 >> 1 = 10 =2

记忆:&等同于and,\等同于或,^等于不或,即不是或的都为0,删掉右侧位

#python insitute test题如下:a = 1b = 0a = a ^ b#0001 ^ 0000 =0001十进制为1b = a ^ b#0001 ^ 0000 =0001十进制为1a = a ^ b#0001 ^ 0001 =0000十进制为0print(a,b)执行结果如下:0 1 #python insitute test题如下:a = 1b = 0c = a & b#0001 & 0000 = 0000十进制为0d = a | b#0001 | 0000 = 0001十进制为1e = a ^ b#0001 ^ 0000 = 0001十进制为1print(c + d + e)执行结果如下:2 #python insitute test题如下:var = 1while var

相关推荐: