Skip to content

Añadir ejercicio 042-understanding_classes #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

josemoracard
Copy link
Contributor

No description provided.


student1 = Student("Ana", 20, 80)

student1.introduce()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agregar print(student1.introduce())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

student1 = Student("Ana", 20, 80)

student1.introduce()
student1.study(3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agregar print(student1.study(3))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

def study(self, hours): # Esto es otro método
print(f"{self.name} is studying for {hours} hours.")
self.grade += hours * 0.5
print(f"After studying, {self.name}'s new grade is {self.grade}.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quita todos los print, y reemplazalo por un unico return que retorne:

return f"After studying for {hours} hours, {self.name}'s new grade is {self.grade}."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

## 📎 Example:

```py
class Student:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agregar los cambios que se pidieron en el readme en español

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@tommygonzaleza
Copy link
Contributor

tommygonzaleza commented Jan 17, 2024

  • Agregar tests con ChatGPT, debes validar:
    • La clase Student existe
    • La clase Student tiene el atributo name.
    • La clase Student tiene el atributo age.
    • La clase Student tiene el atributo grade.
    • La clase Student tiene el metodo introduce.
    • El metodo introduce retorna el string esperado (Valida en el mismo test con dos escenarios).
    • La clase Student tiene el metodo study.
    • El metodo study retorna el string esperado (Valida en el mismo test con dos escenarios).
  • Agregar solution, que basicamente es el codigo del readme

@alesanchezr alesanchezr merged commit 75e70d3 into 4GeeksAcademy:master Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants