anirudhp06

Program to join Class 1.0

Nov 23rd, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 7.56 KB | None | 0 0
  1. import webbrowser
  2. import sys as system
  3. from os import system as sys
  4. from time import sleep
  5. import datetime #Importing all necessary Modules required for program
  6. x = datetime.datetime.now()
  7. a=["Java","Java-Lab","OS","Unix","DBMS","DBMS-LAB","English","Kannada","CN"]#Setting up Subjects to be displayed
  8. links=["https://trimurl.co/3CGlxF","https://trimurl.co/L0JHyM","https://trimurl.co/cm7wEP","https://trimurl.co/DYBRhW","https://trimurl.co/tuOTd1","https://trimurl.co/SRbwm1","https://trimurl.co/5HG6X7","https://trimurl.co/40KwHl","https://trimurl.co/oduL2S"]#Links are used to join the classes of corresponding classes
  9.  
  10. while(True):#Infite loop so program can run until user wants to...
  11.     sys("cls")
  12.     print("Which Class do you want to join?")
  13.     sno = 1
  14.     for i in a:
  15.         print("{}.{}".format(sno, i))  # Printing Subjects that are present in variable 'a'
  16.         sno += 1
  17.     print("10.Exit")  # Displayed at last
  18.     select=int(input("Enter Your choice:"))
  19.     if(select==1):
  20.         print("Do you want to schedule When to join?(Y/N)(y/n):")
  21.         sec=input()
  22.         if(sec=="y" or sec=="Y"):#If statements to determine correct decisions:
  23.             print("After how much mins u want to join class? (in Mins):")
  24.             rem=int(input())
  25.             print(x.strftime("%I:%M %p"), end=" ")
  26.             print("Joining Java Class in {} mins".format(rem))
  27.             sleep(rem*60)#Sleep Function takes only seconds as inputs so multiplied 'rem' with 60
  28.             sys("cls")
  29.             webbrowser.open(links[select - 1])#Function which will accurately opens class in web browser
  30.         else:
  31.             print(x.strftime("%I:%M %p"), end=" ")
  32.             print("Joining Java Class")
  33.             webbrowser.open(links[select-1])
  34.             sleep(1)
  35.             sys("cls")
  36.     elif select==2:
  37.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  38.         sec=input()
  39.         if (sec == "y" or sec == "Y"):
  40.             print("After how much mins u want to join class? (in Mins):")
  41.             rem = int(input())
  42.             print(x.strftime("%I:%M %p"), end=" ")
  43.             print("Joining Java Lab in {} mins".format(rem))
  44.             sleep(rem * 60)
  45.             sleep(1)
  46.             sys("cls")
  47.             webbrowser.open(links[select - 1])
  48.         else:
  49.             print(x.strftime("%I:%M %p"), end=" ")
  50.             print("Joining Java-Lab")
  51.             webbrowser.open(links[select-1])
  52.             sleep(1)
  53.             sys("cls")
  54.     elif select==3:
  55.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  56.         sec = input()
  57.         if (sec == "y" or sec == "Y"):
  58.             print("After how much mins u want to join class? (in Mins):")
  59.             rem = int(input())
  60.             print(x.strftime("%I:%M %p"), end=" ")
  61.             print("Joining OS in {} mins".format(rem))
  62.             sleep(rem * 60)
  63.             sleep(1)
  64.             sys("cls")
  65.             webbrowser.open(links[select - 1])
  66.         else:
  67.             print(x.strftime("%I:%M %p"), end=" ")
  68.             print("Joining OS")
  69.             webbrowser.open(links[select - 1])
  70.             sleep(1)
  71.             sys("cls")
  72.     elif select==4:
  73.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  74.         sec = input()
  75.         if (sec == "y" or sec == "Y"):
  76.             print("After how much mins u want to join class? (in Mins):")
  77.             rem = int(input())
  78.             print(x.strftime("%I:%M %p"), end=" ")
  79.             print("Joining UNIX  in {} mins".format(rem))
  80.             sleep(rem * 60)
  81.             sleep(1)
  82.             sys("cls")
  83.             webbrowser.open(links[select - 1])
  84.  
  85.         else:
  86.             print(x.strftime("%I:%M %p"), end=" ")
  87.             print("Joining UNIX")
  88.             webbrowser.open(links[select - 1])
  89.     elif select==5:
  90.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  91.         sec = input()
  92.         if (sec == "y" or sec == "Y"):
  93.             print("After how much mins u want to join class? (in Mins):")
  94.             rem = int(input())
  95.             print(x.strftime("%I:%M %p"), end=" ")
  96.             print("Joining DBMS in {} mins".format(rem))
  97.             sleep(rem * 60)
  98.             sleep(1)
  99.             sys("cls")
  100.             webbrowser.open(links[select - 1])
  101.         else:
  102.             print(x.strftime("%I:%M %p"), end=" ")
  103.             print("Joining DBMS")
  104.             webbrowser.open(links[select - 1])
  105.             sleep(1)
  106.             sys("cls")
  107.     elif select==6:
  108.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  109.         sec = input()
  110.         if (sec == "y" or sec == "Y"):
  111.             print("After how much mins u want to join class? (in Mins):")
  112.             rem = int(input())
  113.             print(x.strftime("%I:%M %p"), end=" ")
  114.             print("Joining DBMS Lab in {} mins".format(rem))
  115.             sleep(rem * 60)
  116.             sleep(1)
  117.             sys("cls")
  118.             webbrowser.open(links[select - 1])
  119.         else:
  120.             print(x.strftime("%I:%M %p"), end=" ")
  121.             print("Joining DBMS-Lab")
  122.             sleep(1)
  123.             sys("cls")
  124.             webbrowser.open(links[select - 1])
  125.     elif select==7:
  126.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  127.         sec = input()
  128.         if (sec == "y" or sec == "Y"):
  129.             print("After how much mins u want to join class? (in Mins):")
  130.             rem = int(input())
  131.             print(x.strftime("%I:%M %p"), end=" ")
  132.             print("Joining English in {} mins".format(rem))
  133.             sleep(rem * 60)
  134.             sleep(1)
  135.             sys("cls")
  136.             webbrowser.open(links[select - 1])
  137.         else:
  138.             print(x.strftime("%I:%M %p"), end=" ")
  139.             print("Joining English Class")
  140.             webbrowser.open(links[select - 1])
  141.             sleep(1)
  142.             sys("cls")
  143.     elif select==8:
  144.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  145.         sec = input()
  146.         if (sec == "y" or sec == "Y"):
  147.             print("After how much mins u want to join class? (in Mins):")
  148.             rem = int(input())
  149.             print(x.strftime("%I:%M %p"), end=" ")
  150.             print("Joining Kannada Class in {} mins".format(rem))
  151.             sleep(rem * 60)
  152.             sleep(1)
  153.             sys("cls")
  154.             webbrowser.open(links[select - 1])
  155.         else:
  156.             print(x.strftime("%I:%M %p"), end=" ")
  157.             print("Joining Kannada Class")
  158.             sleep(1)
  159.             sys("cls")
  160.             webbrowser.open(links[select - 1])
  161.     elif select==9:
  162.         print("Do you want to schedule when to join?(Y/N)(y/n):")
  163.         sec = input()
  164.         if (sec == "y" or sec == "Y"):
  165.             print("After how much mins u want to join class? (in Mins):")
  166.             rem = int(input())
  167.             print(x.strftime("%I:%M %p"), end=" ")
  168.             print("Joining Computer Networking Class in {} mins".format(rem))
  169.             sleep(rem * 60)
  170.             sleep(1)
  171.             sys("cls")
  172.             webbrowser.open(links[select - 1])
  173.         else:
  174.             print(x.strftime("%I:%M %p"), end=" ")
  175.             print("Joining Computer Networking Class")
  176.             sleep(1)
  177.             sys("cls")
  178.             webbrowser.open(links[select - 1])
  179.     elif select==10:
  180.         print("Execution of program Stopped\n Closing Program in 3 Seconds")
  181.         sleep(2)
  182.         system.exit()#Exits program After 3 seconds of selecting option to exit.
  183.     else:
  184.         print(x.strftime("%I:%M %p"), end=" ")
  185.         print("Try Again with Option")
  186.         sys('cls')#Clears the user screen if user enters wrong option.
  187.  
  188.  
  189.  
  190.  
  191.  
Advertisement
Add Comment
Please, Sign In to add comment