From ef89cb44b45300403b5aedbf69b806a8b5d982e4 Mon Sep 17 00:00:00 2001 From: Deepshikha Rana Date: Wed, 25 Sep 2019 16:59:14 +0530 Subject: [PATCH] Added plugin for b17120 --- jarviscli/plugins/a.py | 8 ++++++++ jarviscli/plugins/hello.py | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 jarviscli/plugins/a.py create mode 100644 jarviscli/plugins/hello.py diff --git a/jarviscli/plugins/a.py b/jarviscli/plugins/a.py new file mode 100644 index 000000000..643951dd6 --- /dev/null +++ b/jarviscli/plugins/a.py @@ -0,0 +1,8 @@ +num1 = 15 +num2 = 12 + +# Adding two nos +sum = num1 + num2 + +# printing values +print("Sum of {0} and {1} is {2}" .format(num1, num2, sum)) \ No newline at end of file diff --git a/jarviscli/plugins/hello.py b/jarviscli/plugins/hello.py new file mode 100644 index 000000000..9842ff610 --- /dev/null +++ b/jarviscli/plugins/hello.py @@ -0,0 +1,22 @@ +from plugin import plugin +import os + +@plugin("infob17120") +def helloworld(jarvis, s): + print("Welcome to the info plugin of Deepshikha Rana roll num B17120. Please select one of the options below:\n[F]ull name // prints your full name\n[H]ometown // prints your hometownFavourite \n[M]ovie // prints your fav movieFavourite \n[S]portsperson // prints your fav sportspersonLaunch \n[P]ython program written by me // launch a (short)// python program") + val = input() + if(val=='F'): + jarvis.say("Deepshikha Rana\n") + elif(val=='H'): + jarvis.say("Haryana\n") + elif(val=='M'): + jarvis.say("Super 30\n") + elif(val=='S'): + jarvis.say("MS DHONi\n") + elif(val=='P'): + os.system("python ~/Jarvis/custom/a.py") + # jarvis.say("Python\n") + else: + jarvis.say("Invalid Input") + """Repeats what you type""" + # jarvis.say(s) \ No newline at end of file