- Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathq5.py
22 lines (17 loc) · 511 Bytes
/
q5.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Question:
# Define a class which has at least two methods:
# getString: to get a string from console input
# printString: to print the string in upper case.
# Also please include simple test function to test the class methods.
# Hints:
# Use init method to construct some parameters
classIOstring():
def__init__(self):
pass
defgetString(self):
self.s=input()
defprintString(self):
print(self.s.upper())
string=IOstring()
string.getString()
string.printString()