repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class User():


  def __init__(self, first, last, user, is_admin):
    self.first = first
    self.last = last
    self.user = user
    self.is_admin = is_admin

  def describe_user(self):
    print(f"User {self.first } {self.last} {self.user})")
    if self.is_admin:
      print(f"User {self.user} is am admin.")

  def greet_user(self):
    print(f"Hello {self.first}.")


jim = User("jim", "james", "jjames" False)