How to Open Multiple Software Using Python OS Module

Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python

Program 1

import os
choice=0
while(choice!=8):
    print("--------------------Menu--------------------")
    print("1.NotePad\n2.Calculator\n3.MS Word\n4.MS Excel\n5.MS Paint\n6.Power Point\n7.Notepad++\n8.Exit")
    print("---------------------------------------------")
    choice=int(input("Enter your choice"))
    if(choice==1):
        os.system("notepad")
    elif (choice==2):
        os.system("calc")
    elif (choice==3):
        os.system("start winword.exe")
    elif (choice==4):
        os.system("start excel.exe")
    elif(choice==5):
        os.system("mspaint")
    elif (choice==6):
        os.system("start powerpnt.exe")
    elif (choice==7):
        os.system("start notepad++.exe")
    else:
        print("Invalid choice.....")

 

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

courses
Image

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *