[oop] 用 __init__ 给对象传参 题目反馈

オープン
#310 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python

調査の方向性

Start by reproducing the exercise described as “用 init 给对象传参” with the submitted Person example and inspect how the checker and “View Answer” respond. Done means the exercise correctly accepts the intended solution or clearly identifies the actual mismatch to the learner.

索引モデルが issue の本文から書いたものです。

説明

题目 用 init 给对象传参(基础语法的第八章:面对对象的第二题)

我是一名之前没接触过编程的纯新人,在尝试使用您制作的网页学习python时于上题时反复调整print处的空格位置和使用ai工具,但还是无法通过检测过关,在使用“查看答案”还是无法找到问题所在,不清楚是什么情况,特此求解

I'm a complete beginner with no prior programming experience. While trying to learn Python using the webpage you created, I got stuck on the previous question. I repeatedly adjusted the spacing in the  print  statement and even used AI tools, but I still couldn't pass the test. Even after clicking "View Answer," I couldn't figure out what the issue was. I'm not sure what's going on, so I'm reaching out for help.

这是我打出的代码:
class Person:
def init(self, name, age):
self.name = name
self.age = age

def greet(self):
    print(f'我叫 {self.name},今年 {self.age} 岁')

p = Person('张三', 18)
p.greet()

主要言語
Python
スター
28.1k
フォーク
5.6k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

walter201230/Python のほかの issue

walter201230/Python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。