diff --git a/260421 09.py b/260421 09.py new file mode 100644 index 0000000..fe7e407 --- /dev/null +++ b/260421 09.py @@ -0,0 +1,14 @@ +s = "Hello" +for char in s: + print(f"{char}的ASCII码:{ord(char)}") + print(f"ASCII码65对应的字符:{chr(65)}") +#因为图像是计算机天生能理解的数值,文本是需要“翻译+理解”的人类语言 + +A = [3,4] +B = [1,2] +add_res = [A[0]+B[0],A[1]+B[1]] +print("1.A+B=",add_res) +mul_res = [2*A[0],2*A[1]] +print("2.2xA=",mul_res) +mod_A = pow(A[0]**2+A[1]**2,0.5) +print("3.向量A的模=",mod_A) \ No newline at end of file