Write a Python class that will initiate a number, input a number and print the number
Topic: Write a Python class that will initiate a number, input a number and print the number
Solution
class Number: def __init__(self, num): self.num = num def inputNum(self): self.num = int(input("Enter an integer number: ")) def printNum(self): print(self.num)
List all Python Programs