
import string
import random


class Robot():
    """Robot facory settings"""
    def __init__(self):
        self.name = ""

    


import string
import random


class Robot():
    """Robot facory settings"""
    def __init__(self):
        self.name = ""

    def factory_name(self):

        char = ''.join(random.SystemRandom().choice(string.ascii_uppercase) for _ in range(2))
        num = ''.join(random.SystemRandom().choice(string.digits) for _ in range(3))
        self.name = char + num
        return self.name

R1 = Robot()
print(R1.factory_name())

Add methord to generate unique robot name
Add methord to generate unique robot name

  
  import string
  import random
  
  
  class Robot():
      """Robot facory settings"""
      def __init__(self):
          self.name = ""
  
-     
+     def factory_name(self):
  
+         char = ''.join(random.SystemRandom().choice(string.ascii_uppercase) for _ in range(2))
+         num = ''.join(random.SystemRandom().choice(string.digits) for _ in range(3))
+         self.name = char + num
+         return self.name
+ 
+ R1 = Robot()
+ print(R1.factory_name())
+ 
Add methord to generate unique robot name
## Code Before:

import string
import random


class Robot():
    """Robot facory settings"""
    def __init__(self):
        self.name = ""

    

## Instruction:
Add methord to generate unique robot name
## Code After:

import string
import random


class Robot():
    """Robot facory settings"""
    def __init__(self):
        self.name = ""

    def factory_name(self):

        char = ''.join(random.SystemRandom().choice(string.ascii_uppercase) for _ in range(2))
        num = ''.join(random.SystemRandom().choice(string.digits) for _ in range(3))
        self.name = char + num
        return self.name

R1 = Robot()
print(R1.factory_name())
