import cassiopeia as cass
from cassiopeia.core import Summoner


def print_summoner(name: str, id: int):
    me = Summoner(name="Kalturi", id=21359666)

    #matches = cass.get_matches(me)
    matches = me.matches
    match = matches[0]
    print(match.id)
    for p in match.participants:
        print(p.id, p.champion.name)


if __name__ == "__main__":
    print_summoner(name="Kalturi", id=21359666)


import cassiopeia as cass
from cassiopeia.core import Summoner


def print_newest_match(name: str, region: str):
    summoner = Summoner(name=name, region=region)

    # matches = cass.get_matches(summoner)
    matches = summoner.matches
    match = matches[0]
    print('Match ID:', match.id)
    for p in match.participants:
        print(p.name, 'playing', p.champion.name)


if __name__ == "__main__":
    print_newest_match(name="Kalturi", region="NA")

Add print description, use function arguments
Add print description, use function arguments

- changed name and ID to being name and region
- Add a string to the print calls denoting what's being printed out

  import cassiopeia as cass
  from cassiopeia.core import Summoner
  
  
- def print_summoner(name: str, id: int):
-     me = Summoner(name="Kalturi", id=21359666)
+ def print_newest_match(name: str, region: str):
+     summoner = Summoner(name=name, region=region)
  
-     #matches = cass.get_matches(me)
+     # matches = cass.get_matches(summoner)
-     matches = me.matches
+     matches = summoner.matches
      match = matches[0]
-     print(match.id)
+     print('Match ID:', match.id)
      for p in match.participants:
-         print(p.id, p.champion.name)
+         print(p.name, 'playing', p.champion.name)
  
  
  if __name__ == "__main__":
-     print_summoner(name="Kalturi", id=21359666)
+     print_newest_match(name="Kalturi", region="NA")
  
- 
Add print description, use function arguments
## Code Before:
import cassiopeia as cass
from cassiopeia.core import Summoner


def print_summoner(name: str, id: int):
    me = Summoner(name="Kalturi", id=21359666)

    #matches = cass.get_matches(me)
    matches = me.matches
    match = matches[0]
    print(match.id)
    for p in match.participants:
        print(p.id, p.champion.name)


if __name__ == "__main__":
    print_summoner(name="Kalturi", id=21359666)


## Instruction:
Add print description, use function arguments
## Code After:
import cassiopeia as cass
from cassiopeia.core import Summoner


def print_newest_match(name: str, region: str):
    summoner = Summoner(name=name, region=region)

    # matches = cass.get_matches(summoner)
    matches = summoner.matches
    match = matches[0]
    print('Match ID:', match.id)
    for p in match.participants:
        print(p.name, 'playing', p.champion.name)


if __name__ == "__main__":
    print_newest_match(name="Kalturi", region="NA")
