PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Computer():
def __init__(self,cpu,ram):
self.cpu = cpu
self.ram = ram
def config(self):
print(f"config is {self.cpu} and {self.ram}.")
comp1 = Computer('i5',16)
comp2 = Computer('Ryzen 3',8)
comp1.config()
comp2.config()
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run