cs50p: CS50's Introduction to Programming with Python - CS%E8%87%AA%E5%AD%A6%E6%8C%87%E5%8D%97 #390
Replies: 14 comments 17 replies
-
准备三天(2/12~2/14)速通一下这个课,习题集的解答放在仓库里 https://github.com/mancuoj/CS50P |
Beta Was this translation helpful? Give feedback.
-
大佬week 5的test_plates.py的实现里少考虑了一种情况: beginning alphabetical checks。要再加一条断言如: assert is_valid("A1") == False才能通过所有样例似乎(我这里是这个情况) |
Beta Was this translation helpful? Give feedback.
-
有哪位大佬知道check50 出现的You seem to be missing these required files错误吗,相应的文件夹里明明就包含了对应的py文件,找了好久都没解决好T^T
|
Beta Was this translation helpful? Give feedback.
-
为什么我做week4的时候,import总是提示:Import "pyfiglet" could not be resolved,但我在终端也pip install pyfiglet==0.7了,并且pip list检查也能看到pyfiglet |
Beta Was this translation helpful? Give feedback.
-
有没有Java课程的推荐? |
Beta Was this translation helpful? Give feedback.
-
想问一下CS50P和CS61A是二选一即可么 |
Beta Was this translation helpful? Give feedback.
-
the best one in cs50p OOP |
Beta Was this translation helpful? Give feedback.
-
20230727更新,CS50要有一门专门的课程讲SQL了!泪目 |
Beta Was this translation helpful? Give feedback.
-
在Week 4的little professor这道题中,我本地一直都是过的,然后交上去总是会出现”Did not find "9" in "Level: 6 + 6 =..."“这个错误。我看了一下我的actual output,感觉里面没有把我的输出显示全。 import random
def main():
l = get_level()
cnt1 = 0
cnt2 = 0
lx = -1
ly = -1
p = 10
i = 0
while i<p:
i += 1
if (i == 13):
print(f"Score: 9")
x = generate_integer(l)
y = generate_integer(l)
if (lx >= 0):
x = lx
y = ly
print(f"{x} + {y} = ")
z = input("").strip()
print(f"z = {x}")
if (not z.isdigit() or int(z) != x + y):
print("EEE")
lx = x
ly = y
cnt2 += 1
p += 1
if (cnt2 == 3):
print(f"{x} + {y} = {x + y}")
lx = -1
p -= 1
else:
cnt2 = 0
cnt1 = cnt1 + 1
lx = -1
print(f"Score: 9")
def generate_integer(level):
if level == 1:
return random.randint(0,9)
elif level == 2:
return random.randint(10,99)
else:
return random.randint(100,999)
def get_level():
while True:
try:
n = int(input("Level: ").strip())
if (n <= 0 or n > 3):
raise ValueError
break
except ValueError:
pass
return n
if __name__ == "__main__":
main() |
Beta Was this translation helpful? Give feedback.
-
这是我的习题解答,欢迎友友参考https://github.com/leishaozaici/CS50P-2022 |
Beta Was this translation helpful? Give feedback.
-
把全部课程,笔记,习题,大作业做完了用了60h,供参考~ |
Beta Was this translation helpful? Give feedback.
-
讲的挺好的,在学习python的过程中多次强调自己去查看官方文档,培养英语能力 |
Beta Was this translation helpful? Give feedback.
-
我创建了一个学习交流 CS50 的群 : mkjnnm, 大家感兴趣的可以进群交流学习呀~ |
Beta Was this translation helpful? Give feedback.
-
cs50p: CS50's Introduction to Programming with Python - CS%E8%87%AA%E5%AD%A6%E6%8C%87%E5%8D%97
CS自学指南
https://csdiy.wiki/%E7%BC%96%E7%A8%8B%E5%85%A5%E9%97%A8/CS50P/
Beta Was this translation helpful? Give feedback.
All reactions