Skip to content

Commit 620625b

Browse files
Chen GaoChen Gao
Chen Gao
authored and
Chen Gao
committed
continue exercise
1 parent 5cdb0ef commit 620625b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

python_exercises.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ def q4_listtuple_s():
3333
print(l)
3434
print(t)
3535

36+
################# question 5 ###################
37+
class q5_string:
38+
def __init__(self):
39+
self.get_string=""
40+
def getString(self):
41+
self.get_string=input()
42+
def printString(self):
43+
print(self.get_string.upper())
44+
45+
#test5 = q5_string()
46+
#test5.getString()
47+
#test5.printString()
48+
49+
################# question 6 ###################
50+
3651

3752
if __name__ == "__main__":
38-
q4_listtuple_s()
53+
test5 = q5_string()
54+
test5.getString()
55+
test5.printString()

0 commit comments

Comments
 (0)