Post

object, function, if, for

✅ object

1
2
3
4
5
6
7
8
9
  class singer:
    def name():
      print("singsing")
    def genre():
      print("jazz")
    def age():
      print("22")

  singer.name()

✅ function

1
2
def sayHello():
  print("Hello World")

✅ if

1
2
  if True:
    print("this is how you write if conditional")

✅ for

1
2
3
4
5
6
7
  for i in range(1,5):
    print(i)

## result: 1
##         2
##         3
##         4
This post is licensed under CC BY 4.0 by the author.