Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from chatterbot import ChatBot
2-
2+
importos
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('033円c')
13+
os.system('cls'ifos.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)

AltStyle によって変換されたページ (->オリジナル) /