{"id":3504,"date":"2025-10-09T00:12:49","date_gmt":"2025-10-08T16:12:49","guid":{"rendered":"https:\/\/tobykskgd.life\/?p=3504"},"modified":"2025-10-09T00:15:27","modified_gmt":"2025-10-08T16:15:27","slug":"115","status":"publish","type":"post","link":"https:\/\/tobykskgd.life\/index.php\/115\/","title":{"rendered":"CS50P Problem Set 0"},"content":{"rendered":"\n<p>\u8bfe\u7a0b\uff1a<a href=\"https:\/\/cs50.harvard.edu\/python\/\">CS50\u2019s Introduction to Programming with Python<\/a><\/p>\n\n\n\n<p>CS50 Python 2025 \u8bfe\u7a0b\u7684\u95ee\u9898\u96c6\u4f5c\u4e1a\u63d0\u4ea4\u3002\u4e3b\u8981\u63d0\u4f9b\u4e00\u4e2a\u672c\u4eba\u7684\u89e3\u9898\u601d\u8def\uff0c\u4ec5\u4f9b\u53c2\u8003\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Indoor Voice<\/h3>\n\n\n\n<p>Problem: <\/p>\n\n\n\n<p>WRITING IN ALL CAPS IS LIKE YELLING.<br>\u5168\u90e8\u5927\u5199\u5199\u4f5c\u5c31\u50cf\u5927\u558a\u5927\u53eb\u3002<\/p>\n\n\n\n<p>Best to use your \u201cindoor voice\u201d sometimes, writing entirely in lowercase.<br>\u6700\u597d\u6709\u65f6\u4f7f\u7528\u4f60\u7684\u201c\u5ba4\u5185\u58f0\u97f3\u201d\uff0c\u5b8c\u5168\u7528\u5c0f\u5199\u5199\u3002<\/p>\n\n\n\n<p>In a file called&nbsp;<code>indoor.py<\/code>, implement a program in Python that prompts the user for input and then outputs that same input in lowercase. Punctuation and whitespace should be outputted unchanged. You\u2019re welcome, but not required, to prompt the user explicitly, as by passing a&nbsp;<code>str<\/code>&nbsp;of your own as an argument to&nbsp;<code>input<\/code>.<br>\u5728\u540d\u4e3a&nbsp;<code>indoor.py<\/code>&nbsp;\u7684\u6587\u4ef6\u4e2d\uff0c\u7528 Python \u5b9e\u73b0\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u63d0\u793a\u7528\u6237\u8f93\u5165\uff0c\u7136\u540e\u4ee5\u5c0f\u5199\u8f93\u51fa\u76f8\u540c\u7684\u8f93\u5165\u3002\u6807\u70b9\u7b26\u53f7\u548c\u7a7a\u683c\u5e94\u539f\u5c01\u4e0d\u52a8\u5730\u8f93\u51fa\u3002\u6b22\u8fce\u4f46\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u660e\u786e\u63d0\u793a\u7528\u6237\uff0c\u4f8b\u5982\u5c06\u60a8\u81ea\u5df1\u7684&nbsp;<code>str<\/code>&nbsp;\u4f5c\u4e3a<code>\u8f93\u5165<\/code>\u7684\u53c2\u6570\u4f20\u9012\u3002<\/p>\n\n\n\n<p>Submit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>indoor = input()\nprint(indoor.lower())\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Playback Speed<\/h3>\n\n\n\n<p>Problem:<\/p>\n\n\n\n<p>Some people have a habit of&nbsp;lecturing&nbsp;speaking rather quickly, and it\u2019d be nice to slow them down, a la YouTube\u2019s 0.75 playback speed, or even by having them pause between words.<br>\u6709\u4e9b\u4eba\u6709\u8bb2\u8bfe\u901f\u5ea6\u76f8\u5f53\u5feb\u7684\u4e60\u60ef\uff0c\u6700\u597d\u653e\u6162\u4ed6\u4eec\u7684\u901f\u5ea6\uff0c\u5c31\u50cf YouTube \u7684 0.75 \u64ad\u653e\u901f\u5ea6\u4e00\u6837\uff0c\u751a\u81f3\u8ba9\u4ed6\u4eec\u5728\u5355\u8bcd\u4e4b\u95f4\u6682\u505c\u3002<\/p>\n\n\n\n<p>In a file called&nbsp;<code>playback.py<\/code>, implement a program in Python that prompts the user for input and then outputs that same input, replacing each space with&nbsp;<code>...<\/code>&nbsp;(i.e., three periods).<br>\u5728\u540d\u4e3a&nbsp;<code>playback.py<\/code>&nbsp;\u7684\u6587\u4ef6\u4e2d\uff0c\u7528 Python \u5b9e\u73b0\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u8be5\u7a0b\u5e8f\u63d0\u793a\u7528\u6237\u8f93\u5165\uff0c\u7136\u540e\u8f93\u51fa\u76f8\u540c\u7684\u8f93\u5165\uff0c\u5c06\u6bcf\u4e2a\u7a7a\u683c\u66ff\u6362\u4e3a&nbsp;<code>...<\/code>\uff08\u5373\u4e09\u4e2a\u53e5\u70b9\uff09\u3002<\/p>\n\n\n\n<p>Submit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>playback = input()\nprint(playback.replace(\" \", \"...\"))\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Making Faces<\/h3>\n\n\n\n<p>Problem:<\/p>\n\n\n\n<p>Before there were emoji, there were&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_emoticons\">emoticons<\/a>, whereby text like&nbsp;<code>:)<\/code>&nbsp;was a happy face and text like&nbsp;<code>:(<\/code>&nbsp;was a sad face. Nowadays, programs tend to convert emoticons to emoji automatically!<br>\u5728\u8868\u60c5\u7b26\u53f7\u51fa\u73b0\u4e4b\u524d\uff0c\u6709<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_emoticons\">\u8868\u60c5\u7b26\u53f7&nbsp;<\/a>\uff0c\u50cf&nbsp;<code>:)<\/code>&nbsp;\u8fd9\u6837\u7684\u6587\u5b57\u662f\u4e00\u5f20\u5feb\u4e50\u7684\u8138\uff0c\u50cf&nbsp;<code>:(<\/code>&nbsp;\u8fd9\u6837\u7684\u6587\u5b57\u662f\u4e00\u5f20\u60b2\u4f24\u7684\u8138\u3002\u5982\u4eca\uff0c\u7a0b\u5e8f\u503e\u5411\u4e8e\u81ea\u52a8\u5c06\u8868\u60c5\u7b26\u53f7\u8f6c\u6362\u4e3a\u8868\u60c5\u7b26\u53f7\uff01<\/p>\n\n\n\n<p>In a file called&nbsp;<code>faces.py<\/code>, implement a function called&nbsp;<code>convert<\/code>&nbsp;that accepts a&nbsp;<code>str<\/code>&nbsp;as input and returns that same input with any&nbsp;<code>:)<\/code>&nbsp;converted to&nbsp;<img loading=\"lazy\" decoding=\"async\" alt=\"?\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/twitter\/twemoji@14.0.2\/assets\/72x72\/1f642.png\" width=\"16\" height=\"16\">&nbsp;(otherwise known as a&nbsp;<a href=\"https:\/\/emojipedia.org\/slightly-smiling-face\/\">slightly smiling face<\/a>) and any&nbsp;<code>:(<\/code>&nbsp;converted to&nbsp;<img loading=\"lazy\" decoding=\"async\" alt=\"?\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/twitter\/twemoji@14.0.2\/assets\/72x72\/1f641.png\" width=\"16\" height=\"16\">&nbsp;(otherwise known as a&nbsp;<a href=\"https:\/\/emojipedia.org\/slightly-frowning-face\/\">slightly frowning face<\/a>). All other text should be returned unchanged.<br>\u5728\u540d\u4e3a&nbsp;<code>faces.py<\/code>&nbsp;\u7684\u6587\u4ef6\u4e2d\uff0c\u5b9e\u73b0\u4e00\u4e2a\u540d\u4e3a&nbsp;<code>convert<\/code>&nbsp;\u7684\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u63a5\u53d7&nbsp;<code>str<\/code>&nbsp;\u4f5c\u4e3a\u8f93\u5165\uff0c\u5e76\u8fd4\u56de\u76f8\u540c\u7684\u8f93\u5165\uff0c\u5176\u4e2d\u5305\u542b\u8f6c\u6362\u5230&nbsp;<img loading=\"lazy\" decoding=\"async\" height=\"16\" width=\"16\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/twitter\/twemoji@14.0.2\/assets\/72x72\/1f642.png\" alt=\"?\">&nbsp;\u7684\u4efb\u4f55&nbsp;<code>:)<\/code>\uff08\u4e5f\u79f0\u4e3a<a href=\"https:\/\/emojipedia.org\/slightly-smiling-face\/\">\u5fae\u5fae\u5fae\u7b11\u7684\u8138&nbsp;<\/a>\uff09\u548c\u8f6c\u6362\u4e3a\u7684\u4efb\u4f55&nbsp;<img loading=\"lazy\" decoding=\"async\" height=\"16\" width=\"16\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/twitter\/twemoji@14.0.2\/assets\/72x72\/1f641.png\" alt=\"?\">&nbsp;<code>:(<\/code>\uff08\u4e5f\u79f0\u4e3a<a href=\"https:\/\/emojipedia.org\/slightly-frowning-face\/\">\u5fae\u5fae\u76b1\u7709\u7684\u8138&nbsp;<\/a>\uff09\u3002\u6240\u6709\u5176\u4ed6\u6587\u672c\u5e94\u539f\u5c01\u4e0d\u52a8\u5730\u8fd4\u56de\u3002<\/p>\n\n\n\n<p>Then, in that same file, implement a function called&nbsp;<code>main<\/code>&nbsp;that prompts the user for input, calls&nbsp;<code>convert<\/code>&nbsp;on that input, and prints the result. You\u2019re welcome, but not required, to prompt the user explicitly, as by passing a&nbsp;<code>str<\/code>&nbsp;of your own as an argument to&nbsp;<code>input<\/code>. Be sure to call&nbsp;<code>main<\/code>&nbsp;at the bottom of your file.<br>\u7136\u540e\uff0c\u5728\u540c\u4e00\u6587\u4ef6\u4e2d\uff0c\u5b9e\u73b0\u4e00\u4e2a\u540d\u4e3a&nbsp;<code>main<\/code>&nbsp;\u7684\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u63d0\u793a\u7528\u6237\u8f93\u5165\uff0c\u5bf9\u8be5\u8f93\u5165\u8c03\u7528&nbsp;<code>convert<\/code>\uff0c\u5e76\u6253\u5370\u7ed3\u679c\u3002\u6b22\u8fce\u4f46\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u660e\u786e\u63d0\u793a\u7528\u6237\uff0c\u4f8b\u5982\u5c06\u60a8\u81ea\u5df1\u7684&nbsp;<code>str<\/code>&nbsp;\u4f5c\u4e3a<code>\u8f93\u5165<\/code>\u7684\u53c2\u6570\u4f20\u9012\u3002\u8bf7\u52a1\u5fc5\u5728\u6587\u4ef6\u5e95\u90e8\u8c03\u7528&nbsp;<code>main<\/code>\u3002<\/p>\n\n\n\n<p>Submit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def convert(text):\n    text = text.replace(\":)\", \"?\")\n    text = text.replace(\":(\", \"?\")\n    return text\n\ndef main():\n    faces = input()\n    print(convert(faces))\n\nmain()\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Einstein<\/h3>\n\n\n\n<p>Problem:<\/p>\n\n\n\n<p>Even if you haven\u2019t studied physics (recently or ever!), you might have heard that&nbsp;?&nbsp;=?\u2062?2, wherein&nbsp;?&nbsp;represents energy (measured in Joules),&nbsp;?&nbsp;represents mass (measured in kilograms), and&nbsp;?&nbsp;represents the speed of light (measured approximately as 300000000 meters per second), per&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Albert_Einstein\">Albert Einstein<\/a>&nbsp;et al. Essentially, the formula means that mass and energy are equivalent.<br>\u5373\u4f7f\u60a8\u6ca1\u6709\u5b66\u4e60\u8fc7\u7269\u7406\u5b66\uff08\u6700\u8fd1\u6216\u66fe\u7ecf\uff01\uff09\uff0c\u60a8\u4e5f\u53ef\u80fd\u542c\u8bf4\u8fc7\uff0c&nbsp;?&nbsp;=?\u2062?2&nbsp;\u5176\u4e2d&nbsp;?&nbsp;\u4ee3\u8868\u80fd\u91cf\uff08\u4ee5\u7126\u8033\u4e3a\u5355\u4f4d\uff09\uff0c&nbsp;?&nbsp;\u4ee3\u8868\u8d28\u91cf\uff08\u4ee5\u5343\u514b\u4e3a\u5355\u4f4d\uff09\uff0c\u4ee3\u8868&nbsp;?&nbsp;\u5149\u901f\uff08\u6d4b\u91cf\u7ea6\u4e3a\u6bcf\u79d2 300000000 \u7c73\uff09\uff0c\u6839\u636e\u963f\u5c14\u4f2f\u7279\u00b7\u7231\u56e0\u65af\u5766\u7b49\u4eba\u7684\u8bf4\u6cd5\u3002\u4ece\u672c\u8d28\u4e0a\u8bb2\uff0c\u8be5\u516c\u5f0f\u610f\u5473\u7740\u8d28\u91cf\u548c\u80fd\u91cf\u662f\u7b49\u4ef7\u7684\u3002<\/p>\n\n\n\n<p>In a file called&nbsp;<code>einstein.py<\/code>, implement a program in Python that prompts the user for mass as an integer (in kilograms) and then outputs the equivalent number of Joules as an integer. Assume that the user will input an integer.<br>\u5728\u540d\u4e3a&nbsp;<code>einstein.py<\/code>&nbsp;\u7684\u6587\u4ef6\u4e2d\uff0c\u7528 Python \u5b9e\u73b0\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u8be5\u7a0b\u5e8f\u63d0\u793a\u7528\u6237\u4ee5\u6574\u6570\uff08\u4ee5\u5343\u514b\u4e3a\u5355\u4f4d\uff09\u8f93\u5165\u8d28\u91cf\uff0c\u7136\u540e\u8f93\u51fa\u7b49\u6548\u7684\u7126\u8033\u6570\u4f5c\u4e3a\u6574\u6570\u3002\u5047\u8bbe\u7528\u6237\u5c06\u8f93\u5165\u4e00\u4e2a\u6574\u6570\u3002<\/p>\n\n\n\n<p>Submit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def energy(m):\n    E = m * 300000000 ** 2\n    return E\n\ndef main():\n    einstein = int(input(\"m: \"))\n    print(energy(einstein))\n\nmain()\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Tip Calculator<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>And now for my Wizard tip calculator.\u73b0\u5728\u662f\u6211\u7684\u5411\u5bfc\u5c0f\u8d39\u8ba1\u7b97\u5668\u3002<\/p>\n\n\n\n<p>\u2014 Morty Seinfeld&nbsp;&nbsp;\u2014 \u83ab\u8482\u00b7\u5b8b\u98de<\/p>\n<\/blockquote>\n\n\n\n<p>In the United States, it\u2019s customary to leave a tip for your server after dining in a restaurant, typically an amount equal to 15% or more of your meal\u2019s cost. Not to worry, though, we\u2019ve written a tip calculator for you, below!<br>\u5728\u7f8e\u56fd\uff0c\u4e60\u60ef\u4e0a\u5728\u9910\u5385\u7528\u9910\u540e\u7ed9\u670d\u52a1\u5458\u7559\u4e0b\u5c0f\u8d39\uff0c\u91d1\u989d\u901a\u5e38\u76f8\u5f53\u4e8e\u7528\u9910\u8d39\u7528\u7684 15% \u6216\u66f4\u591a\u3002\u4e0d\u8fc7\u4e0d\u7528\u62c5\u5fc3\uff0c\u6211\u4eec\u5728\u4e0b\u9762\u4e3a\u60a8\u7f16\u5199\u4e86\u4e00\u4e2a\u5c0f\u8d39\u8ba1\u7b97\u5668\uff01<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>def<\/strong> main():\n    dollars = dollars_to_float(input(\"How much was the meal? \"))\n    percent = percent_to_float(input(\"What percentage would you like to tip? \"))\n    tip = dollars * percent\n    print(f\"Leave $<strong>{<\/strong>tip<strong>:<\/strong>.2f<strong>}<\/strong>\")\n\n\n<strong>def<\/strong> dollars_to_float(d):\n    <em># TODO\n<\/em>\n\n<strong>def<\/strong> percent_to_float(p):\n    <em># TODO\n<\/em>\n\nmain()\n<\/code><\/pre>\n\n\n\n<p>Well, we\u2019ve written&nbsp;<em>most<\/em>&nbsp;of a tip calculator for you. Unfortunately, we didn\u2019t have time to implement two functions:<br>\u597d\u5427\uff0c\u6211\u4eec\u5df2\u7ecf\u4e3a\u60a8\u7f16\u5199\u4e86<em>\u5927\u90e8\u5206<\/em>\u5c0f\u8d39\u8ba1\u7b97\u5668\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u6211\u4eec\u6ca1\u6709\u65f6\u95f4\u5b9e\u73b0\u4e24\u4e2a\u51fd\u6570\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>dollars_to_float<\/code>, which should accept a\u00a0<code>str<\/code>\u00a0as input (formatted as\u00a0<code>$##.##<\/code>, wherein each\u00a0<code>#<\/code>\u00a0is a decimal digit), remove the leading\u00a0<code>$<\/code>, and return the amount as a\u00a0<code>float<\/code>. For instance, given\u00a0<code>$50.00<\/code>\u00a0as input, it should return\u00a0<code>50.0<\/code>.<br><code>dollars_to_float<\/code>\uff0c\u5b83\u5e94\u8be5\u63a5\u53d7\u4e00\u4e2a\u00a0<code>str<\/code>\u00a0\u4f5c\u4e3a\u8f93\u5165\uff08\u683c\u5f0f\u4e3a\u00a0<code>$##.##<\/code>\uff0c\u5176\u4e2d\u6bcf\u4e2a\u00a0<code>#<\/code>\u00a0\u662f\u5341\u8fdb\u5236\u6570\u5b57\uff09\uff0c\u5220\u9664\u524d\u5bfc\u00a0<code>$<\/code>\uff0c\u5e76\u5c06\u91d1\u989d\u4f5c\u4e3a<code>\u6d6e\u70b9<\/code>\u6570\u8fd4\u56de\u3002\u4f8b\u5982\uff0c\u7ed9\u5b9a\u00a0<code>$50.00<\/code>\u00a0\u4f5c\u4e3a\u8f93\u5165\uff0c\u5b83\u5e94\u8be5\u8fd4\u56de\u00a0<code>50.0<\/code>\u3002<\/li>\n\n\n\n<li><code>percent_to_float<\/code>, which should accept a\u00a0<code>str<\/code>\u00a0as input (formatted as\u00a0<code>##%<\/code>, wherein each\u00a0<code>#<\/code>\u00a0is a decimal digit), remove the trailing\u00a0<code>%<\/code>, and return the percentage as a\u00a0<code>float<\/code>. For instance, given\u00a0<code>15%<\/code>\u00a0as input, it should return\u00a0<code>0.15<\/code>.<br><code>percent_to_float<\/code>\uff0c\u5b83\u5e94\u8be5\u63a5\u53d7\u00a0<code>str<\/code>\u00a0\u4f5c\u4e3a\u8f93\u5165\uff08\u683c\u5f0f\u4e3a\u00a0<code>##%\uff0c<\/code>\u00a0\u5176\u4e2d\u6bcf\u4e2a\u00a0<code>#<\/code>\u00a0\u662f\u5341\u8fdb\u5236\u6570\u5b57\uff09\uff0c\u5220\u9664\u5c3e\u968f\u00a0<code>%\uff0c<\/code>\u00a0\u5e76\u5c06\u767e\u5206\u6bd4\u4f5c\u4e3a<code>\u6d6e\u70b9<\/code>\u6570\u8fd4\u56de\u3002\u4f8b\u5982\uff0c\u7ed9\u5b9a\u00a0<code>15%<\/code>\u00a0\u4f5c\u4e3a\u8f93\u5165\uff0c\u5b83\u5e94\u8be5\u8fd4\u56de\u00a0<code>0.15<\/code>\u3002<\/li>\n<\/ul>\n\n\n\n<p>Assume that the user will input values in the expected formats.<br>\u5047\u8bbe\u7528\u6237\u5c06\u4ee5\u9884\u671f\u683c\u5f0f\u8f93\u5165\u503c\u3002<\/p>\n\n\n\n<p>Submit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def main():\n    dollars = dollars_to_float(input(\"How much was the meal? \"))\n    percent = percent_to_float(input(\"What percentage would you like to tip? \"))\n    tip = dollars * percent\n    print(f\"Leave ${tip:.2f}\")\n\n\ndef dollars_to_float(d):\n    # TODO\n    d = float(d.replace(\"$\", \"\"))\n    return d\n\n\ndef percent_to_float(p):\n    # TODO\n    p = float(p.replace(\"%\", \"\"))\n    return p \/ 100\n\n\nmain()\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5173\u4e8e\u63d0\u4ea4<\/h3>\n\n\n\n<p>\u4e24\u5e74\u4e4b\u540e\u53c8\u5f00\u59cb\u5b66\u4e60 CS50 \u76f8\u5173\u8bfe\u7a0b\uff0c\u672c\u6b21\u4e3b\u8981\u9047\u5230\u4e00\u4e2a\u4ee3\u7801\u63d0\u4ea4\u7684\u95ee\u9898\uff0c\u4e4b\u524d\u5728 CS50 X \u8bfe\u7a0b\u4e0a\u672a\u66fe\u9047\u5230\uff0c\u8fd9\u6b21\u4e5f\u662f\u5934\u75bc\u4e86\u5f88\u4e45\uff0c\u4e3b\u8981\u95ee\u9898\u5c31\u662f\u4f7f\u7528 <code>Check50<\/code> \u6216\u8005 <code>Submit50<\/code> \u65f6\u5019\u9047\u5230\u4e0b\u9762\u8fd9\u6837\u7684\u63d0\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You might be using your GitHub password to log in, but that's no longer possible.\n<\/code><\/pre>\n\n\n\n<p>\u8fd9\u8868\u793a <strong>GitHub \u5df2\u7ecf\u4e0d\u5141\u8bb8\u4f7f\u7528\u8d26\u53f7\u5bc6\u7801\u767b\u5f55\u4e86<\/strong>\uff08\u8fd9\u662f\u5b89\u5168\u7b56\u7565\u66f4\u65b0\u540e\u7684\u7ed3\u679c\uff09\u3002<br>\u73b0\u5728 <code>check50<\/code>\uff08\u548c <code>submit50<\/code>\uff09\u9700\u8981\u7528 <strong>Personal Access Token\uff08\u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\uff09<\/strong> \u6765\u767b\u5f55\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<p>\u89e3\u51b3\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<p><strong>\u751f\u6210 GitHub Token<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u767b\u5f55 GitHub<\/li>\n\n\n\n<li>\u70b9\u51fb\u53f3\u4e0a\u89d2\u5934\u50cf \u2192 <strong>Settings<\/strong><\/li>\n\n\n\n<li>\u5de6\u8fb9\u83dc\u5355\u4e2d\u9009\u62e9 <strong>Developer settings<\/strong><\/li>\n\n\n\n<li>\u7136\u540e\u9009\u62e9 <strong>Personal access tokens \u2192 Tokens (classic)<\/strong><\/li>\n\n\n\n<li>\u70b9\u51fb <strong>Generate new token (classic)<\/strong><\/li>\n\n\n\n<li>\u9009\u62e9\u6709\u6548\u671f\uff08\u4f8b\u5982 90 \u5929\uff09<\/li>\n\n\n\n<li>\u52fe\u9009\u8fd9\u4e9b\u6743\u9650\uff1a\n<ul class=\"wp-block-list\">\n<li><code>repo<\/code><\/li>\n\n\n\n<li><code>read:org<\/code><\/li>\n\n\n\n<li><code>user:email<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u70b9\u51fb\u6700\u4e0b\u65b9\u7684 <strong>Generate token<\/strong><\/li>\n<\/ol>\n\n\n\n<p>GitHub \u4f1a\u751f\u6210\u4e00\u4e32\u957f\u957f\u7684\u5b57\u7b26\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ghp_abCdEfG1234567890xyzXYZ\n<\/code><\/pre>\n\n\n\n<p>\u5c06\u8fd9\u4e32\u5b57\u7b26\u4e32\u590d\u5236\u8fdb Verifying\u2026\u2026 \u65f6\u5019\u51fa\u73b0\u7684 Password \u63d0\u793a\u4e2d\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bfe\u7a0b\uff1aCS50\u2019s Introduction to Programming with Python CS50  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3507,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[15,32,3],"class_list":["post-3504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cs50","tag-homework","tag-share","tag-xxbj"],"_links":{"self":[{"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/posts\/3504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/comments?post=3504"}],"version-history":[{"count":3,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/posts\/3504\/revisions"}],"predecessor-version":[{"id":3508,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/posts\/3504\/revisions\/3508"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/media\/3507"}],"wp:attachment":[{"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/media?parent=3504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/categories?post=3504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tobykskgd.life\/index.php\/wp-json\/wp\/v2\/tags?post=3504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}