Coding the Matrix作业Python Lab及提交方法

这是一篇关于Coding the Matrix课程的作业,通过Python实现线性代数。文章详细介绍了如何在Windows环境下使用submit_python_lab.py脚本提交Python作业,强调了在Python3安装目录下操作的必要性,并提供了使用批处理脚本自动化提交的方法。
摘要由CSDN通过智能技术生成

Coding the Matrix: Linear Algebra through Computer Science Applications 

  这是一门用python实现矩阵运算的课,第一次作业就感觉对python的提高很大,用到了各种数据类型。

  代码如下:

## Task 1
minutes_in_week = 60*24*7

## Task 2
remainder_without_mod = 2304811-2304811//47*47

## Task 3
divisible_by_3 = (673+909)/3==0

## Task 4
x = -9
y = 1/2
statement_val = 2**(y+1/2) if x+10<0 else 2**(y-1/2)

## Task 5
first_five_squares = { x*x for x in {1,2,3,4,5} }

## Task 6
first_five_pows_two = { 2**x for x in {0,1,2,3,4} }

## Task 7: enter in the two new sets
X1 = { 1, 2, 3 }
Y1 = { 4, 11, 17 }

## Task 8: enter in the two new sets
X2 = { 1, 2,
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值