Task 1 Python Connect to Os

Screen shot of the screen


No alt text provided for this image
No alt text provided for this image

Code used

import pyttsx3

import os


pyttsx3.speak("welcome how may i help you")


while True:


    print("chat with me as your needs : " , end='')


    p = input()


    if (("run" in p) or ("execute" in p ) or ("open" in p )) and (("chrome" in p) or ("google" in p)):

     os.system("chrome")


    elif (("run" in p) or ("execute" in p)) and (("notepad" in p) or ("editor" in p)):

     os.system("notepad")

    elif("run" in p) and ("player" in p) and ("media" in p):

     os.system("wplayer")

    elif (("hello" in p) or ("hi" in p) or ("namaste" in p)):

     print("Namaste, how are you")

    elif (("fine" in p) or ("good" in p)) and ("you" in p):

     print("I am fine ,Thanks")


    elif ("date" in p) and (("what" in p) or ("show" in p)):

     os.system("date")

    elif (("calculater" in p) or ("cal" in p)) and ("show" in p):

     os.system("cal")


    elif ("exit" in p) or ("quit" in p):

     print("ok , bbye Thanks, see you later")

    else:

      print("sorry , I don't support for it")

To view or add a comment, sign in

More articles by Nimisha Dubey

  • Flutter App Development- Music App

    For creating this App I have installed many packages for the audio and video as follows: audioplayers: ^0.15.

  • Task 1: Flutter App Development

    Firstly I created the folder in Projects Folder from the command line as follows: Secondly I opened Visual Studio Code…

    1 Comment

Insights from the community

Others also viewed

Explore topics