Skip to content

Commit b60259e

Browse files
Merge pull request #3169 from blondon1/patch-2
Use os.system for clearing screen
2 parents 65eaabf + 09fc067 commit b60259e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AI Calculator/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from chatterbot import ChatBot
2-
2+
import os
33
# naming the ChatBot calculator
44
# using mathematical evaluation logic
55
# the calculator AI will not learn with the user input
@@ -10,7 +10,7 @@
1010

1111

1212
# clear the screen and start the calculator
13-
print('\033c')
13+
os.system('cls' if os.name == 'nt' else 'clear')
1414
print("Hello, I am a calculator. How may I help you?")
1515
while (True):
1616
# take the input from the user

0 commit comments

Comments
 (0)