Let's imagine we have a popular online RPG. A player begins with a score of 0 in class E5. A1 is the highest level a player can achieve.

Now let's say the players wants to rank up to class E4. To do so the player needs to achieve at least 100 points to enter the qualifying stage.

Write a script that will check to see if the player has achieved at least 100 points in his class. If so, he enters the qualifying stage. 

In that case, we return, ```"Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."```.

Otherwise return, ```False/false``` (according to the language n use).

NOTE:  Remember, in C# you have to cast your output value to Object type!

Difficulty: introductory

Starter code:

def playerRankUp(pts):
	

Solutions:
def playerRankUp(pts):
    msg = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." 
    return msg if pts >=100 else False

def playerRankUp(pts):
    return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts >= 100 else False

def playerRankUp(pts):
    if pts >= 100: return 'Well done! You have advanced to the ' \
                          'qualifying stage. Win 2 out of your ' \
                          'next 3 games to rank up.'
    else: return False

def playerRankUp(pts):
    return [False, 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'][pts >= 100]

def playerRankUp(pts):
     return [False, "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."][pts > 99]

playerRankUp = lambda p: False if p<100 else "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

def playerRankUp(pts):
  qualStageStr = 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'
  return qualStageStr if pts >= 100 else False

def playerRankUp(p):
  return p >= 100 and "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

playerRankUp=lambda pts: "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts>=100 else False

def playerRankUp(pts):
     return pts >= 100 and "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

def playerRankUp(pts):
     return (False, "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.")[pts >= 100]

def playerRankUp(pts):
    return 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.' * (pts > 99) or False

def playerRankUp(pts):
    msg0 = 'Well done! You have advanced to the qualifying stage.'
    msg1 = 'Win 2 out of your next 3 games to rank up.'
    return [False, msg0+' '+msg1][pts > 99]

def playerRankUp(pts):
    rank_up = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    try:
        rank_up[pts+4]
    except IndexError:
        return rank_up
    return False

from typing import Union

def playerRankUp(pts: int) -> Union[int, str]:
    """
    Check if the player has achieved at least 100 points in his class.
    If so, he enters the qualifying stage with congratulations message.
    """
    return {
        pts >= 100: "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    }.get(True, False)

def playerRankUp(pts):
    a= lambda pts: "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts >= 100 else False
    return a(pts)

MSG = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
def playerRankUp(pts):
    return MSG if pts >= 100 else False

def playerRankUp(pts):
     return False if not pts >= 100 else "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."


def playerRankUp(p):
    s = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    if p >=100:
        return s
    else:
        return False

def playerRankUp(pts):
    return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts // 100 > 0 else False

def playerRankUp(pts):
    return "Well done! You have advanced to the \
qualifying stage. Win 2 out of your next 3 games \
to rank up." if pts>=100 else False

def playerRankUp(pts, lvl= "E4"):
    if pts < 100:
        return False
    else :
        lvl = "E5"
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    


def playerRankUp(pts):
#     levels = pts // 100
    return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts >= 100 else False

def playerRankUp(pts):
    win = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return win if pts > 99 else False

def playerRankUp(n):
    if n>=100:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else:
        return False

def playerRankUp(pts):
    return "Well done! You have advanced to the qualifying stage. " \
    + "Win 2 out of your next 3 games to rank up." if pts >= 100 else False

def playerRankUp(player_points):
    if player_points < 100:
        return False
    else:
        return (f"Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.")

def playerRankUp(pts):
     good = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." 
     return good if pts >= 100 else False

def playerRankUp(pts):
    if pts>=100:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else:
        return pts>=100
     #your code here


def playerRankUp(pts):
     return (False,"Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.") [pts > 99]

def playerRankUp(pts):
    blob = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return blob if pts >= 100 else False

def playerRankUp(pts):
    if(pts >= 100):
        return f"Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else:
        return False

def playerRankUp(pts):
    words = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return words if pts >= 100 else False

playerRankUp=lambda i:"Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if i>=100 else False

def playerRankUp(pts):
     #your code here
    congrat = 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'
    return congrat if pts >= 100 else False

def playerRankUp(pts):
    return "Well done! You have advanced to the qualifying stage. Win 2 out" \
           " of your next 3 games to rank up." if pts >= 100 else False

def playerRankUp(pts):
    msg = (
        'Well done! You have advanced to the qualifying stage. '
        + 'Win 2 out of your next 3 games to rank up.'
    )
    
    return msg if pts > 99 else False

def playerRankUp(pts):
    if pts >= 100:
      x =  "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
      return x
    else:
        return False

def playerRankUp(level):
    if level >= 100:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return False

def playerRankUp(pts):
    if pts >= 100:
        str="Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
        return str
    elif pts < 100:
        return False


def playerRankUp(pts):
    info = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return info if pts >= 100 else False

def playerRankUp(pts):
    result = "Well done! You have advanced to the qualifying stage. "\
             "Win 2 out of your next 3 games to rank up."
    return result if pts >= 100 else False 

def playerRankUp(pts):
     #your code here
    a = (pts - 100)//100
    if a < 0:
        return False
    else:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

def playerRankUp(pts):
    a = pts >= 100
    return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if a else a

def playerRankUp(pts):
    if pts >= 100:
        return "Well done! You have advanced to the qualifying stage." \
               " Win 2 out of your next 3 games to rank up."
    return False

def playerRankUp(pts):
    msg = 'Well done! You have advanced to the qualifying stage. ' +\
          'Win 2 out of your next 3 games to rank up.'
    return msg if pts >= 100 else False    

def playerRankUp(pts):
    s = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return s if pts > 99 else False

playerRankUp = lambda pts: {0: False}.get(max(0,pts//100), 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.')

def playerRankUp(pts):
     str = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
     return str if pts >= 100 else False

def playerRankUp(pts):
     return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."\
     if pts > 99 else False

def player_rank_up(pts):
    if pts >= 100:
         return 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'
    else:
        return False
     
     
playerRankUp = player_rank_up # camelCase bad 

def playerRankUp(pts):
    rank_up = "Well done! You have advanced to the qualifying stage. " \
              "Win 2 out of your next 3 games to rank up."
    return rank_up if pts >= 100 else False

def playerRankUp(pts):
    if 100 <= pts:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else:
        return False


def playerRankUp(pts):
  if pts>=100:
    return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."#your code he
  else:
    return False

def playerRankUp(pts):
     txt = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
     return txt if pts>=100 else False

def playerRankUp(pts):
    if (pts < 99):
        return False
    else: 
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

def playerRankUp(pts):
    return 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.' if pts >= 100 else False
    #Flez


def playerRankUp(pts):
    if pts >= 100: return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    if pts < 100: return False

def playerRankUp(pts):
    if pts == 100:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    if pts > 100:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else: 
        return False

def playerRankUp(pts):
     return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts >= 100 else pts >= 100

def playerRankUp(pts):
    if pts >= 100:
        # Enter qualifying state
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else:
        return False

def playerRankUp(pts):
    return False if pts // 100 == 0 or pts < 0 else "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." 

def playerRankUp(pts):
    if 100>pts: return False
    return ("Well done! You have advanced to the qualifying stage."
            " Win 2 out of your next 3 games to rank up.")

def playerRankUp(pts):
  if pts<100: return False
  return "Well done! You have advanced to the qualifying stage. " + \
         "Win 2 out of your next 3 games to rank up."

def playerRankUp(pts):
    if pts >= 100:
        response = 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'
    else:
        response = False
    return response
  


def playerRankUp(pts):
     return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." if pts > 99 else 0

def playerRankUp(pts):
     #your code here
     msg_str = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
     return msg_str if pts >= 100 else False

def playerRankUp(pts):
    result = False
    if pts >= 100:
        result = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

    return result

def playerRankUp(pts):
    msg = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return False if pts < 100 else msg

def playerRankUp(pts, msg = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."): return False if pts < 99 else msg


def playerRankUp(pts):
    num = pts
    if pts <= 64:
        return False 
    else:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

playerRankUp = lambda p: ("Well done! "\
    "You have advanced to the qualifying stage. "\
    "Win 2 out of your next 3 games to rank up.",
    False)[p < 100]

def playerRankUp(pts):
    rankup = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return rankup if pts >=100 else False

def playerRankUp(pts):
    if pts >= 100:
        return "Well done! You have advanced to the qualifying stage. " + \
               "Win 2 out of your next 3 games to rank up."
    else:
        return False


def playerRankUp(pts):
     return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."if pts>99 else False  #I solved this Kata on  8/27/2019  12:08 PM...#Hussam'sCodingDiary

def playerRankUp(pts):
    if pts >= 100:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else:
        return False
#Completed by Ammar on 25/8/2019 at 03:38PM.


def playerRankUp(points):
    if points<100:
        return False
    else:
        return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."

def playerRankUp(pts):
     #your code here
     output = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
     return output if pts >= 100 else False

def playerRankUp(pts):
    good = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    if pts >= 100:
        return good
    else:
        return False


def playerRankUp(pts):
    msg = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up." 

    if pts >= 100:
        return msg
    else:
        return False

def playerRankUp(pts):
    string = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return string if pts >= 100 else False

playerRankUp = lambda pts: (pts >= 100) and 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'

def playerRankUp(pts):
     return "".join(map(chr,[87,101,108,108,32,100,111,110,101,33,32,89,111,117,32,104,97,118,101,32,97,100,118,97,110,99,101,100,32,116,111,32,116,104,101,32,113,117,97,108,105,102,121,105,110,103,32,115,116,97,103,101,46,32,87,105,110,32,50,32,111,117,116,32,111,102,32,121,111,117,114,32,110,101,120,116,32,51,32,103,97,109,101,115,32,116,111,32,114,97,110,107,32,117,112,46])) if pts >= 100 else False

def playerRankUp(pts):
    mes = 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'
    return mes if pts>= 100 else False

def playerRankUp(pts):
    res = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    if pts < 100: 
        res = False
    return res


def playerRankUp(pts):
    s = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return False if pts <100 else s

def playerRankUp(pts):
     t ="Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
     return '{}'.format(t) if pts >= 100 else False

class Player(object):
    def __init__(self, pts, rank="E5"):
        self.rank = rank
        self.pts = pts

    def check(self):
        if self.pts < 100:
            return False
        else:
            return "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."


def playerRankUp(pts):
    return Player(pts).check()

def playerRankUp(pts):
    msg = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return msg if pts > 99 else False

def playerRankUp(pts):
     if pts >= 100:
         a = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
         return a
     else:
         return False


def playerRankUp(pts):
     txt = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
     return (pts>=100)*txt or False

def playerRankUp(points):
     return 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.' if points >= 100 else False

def playerRankUp(p):
    return [False, "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."][p>=100]


def playerRankUp(pts):
     #your code here
     
    #def __init__(self,pts):
     #    self.pts=pts
    if pts<100:
          return False
    else:
          return 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'

def playerRankUp(pts):
    frase = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    if pts>=100:
         return frase
    else:
        return False


def playerRankUp(pts):

     #your code here
     saying = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.";
     if pts > 99:
         return saying
     else:
         return False

def playerRankUp(pts):
    return False if Player(pts).rank < 100 else 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'


class Player(object):
    def __init__(self, rank):
        self.rank = rank


def playerRankUp(pts):
     #your code here
     if pts < 100:
         return False
     elif pts >= 100:
          return 'Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up.'

def playerRankUp(pts):
    if pts >= 100 :
        res = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    else :
        res = False
    return res

def playerRankUp(pts):
    win_str = "Well done! You have advanced to the qualifying stage. Win 2 out of your next 3 games to rank up."
    return win_str if pts >=100 else False