diff --git a/1.py b/1.py new file mode 100644 index 0000000..ec7780c --- /dev/null +++ b/1.py @@ -0,0 +1 @@ +print('Hello, world!') diff --git a/2.py b/2.py new file mode 100644 index 0000000..ec7780c --- /dev/null +++ b/2.py @@ -0,0 +1 @@ +print('Hello, world!') diff --git a/3.py b/3.py new file mode 100644 index 0000000..60f08aa --- /dev/null +++ b/3.py @@ -0,0 +1 @@ +print('Hello world!') diff --git a/4.py b/4.py new file mode 100644 index 0000000..ec7780c --- /dev/null +++ b/4.py @@ -0,0 +1 @@ +print('Hello, world!') diff --git a/5py b/5py new file mode 100644 index 0000000..ec7780c --- /dev/null +++ b/5py @@ -0,0 +1 @@ +print('Hello, world!') diff --git a/Ajsj b/Ajsj new file mode 100644 index 0000000..a787364 --- /dev/null +++ b/Ajsj @@ -0,0 +1 @@ +34 diff --git a/Annsn b/Annsn new file mode 100644 index 0000000..df90c3c --- /dev/null +++ b/Annsn @@ -0,0 +1 @@ +385 diff --git a/Barbque. py b/Barbque. py index 22fe190..89ce654 100644 --- a/Barbque. py +++ b/Barbque. py @@ -1 +1,2 @@ a=10 +b=20 diff --git a/Bb b/Bb new file mode 100644 index 0000000..ea90ee3 --- /dev/null +++ b/Bb @@ -0,0 +1 @@ +45 diff --git a/Bisht59 b/Bisht59 new file mode 100644 index 0000000..a272009 --- /dev/null +++ b/Bisht59 @@ -0,0 +1 @@ +39 diff --git a/Db. py b/Db. py index 2a57373..d46618e 100644 --- a/Db. py +++ b/Db. py @@ -1 +1,2 @@ a=12 +b=19 diff --git a/DigitalClock.py b/DigitalClock.py new file mode 100644 index 0000000..a4866aa --- /dev/null +++ b/DigitalClock.py @@ -0,0 +1,25 @@ +# importing whole module +from tkinter import * +from tkinter.ttk import * + +# importing strftime function to system time + +from time import strftime + +# creating tkinter window +root = Tk() +root.title('Clock') + +# This function is used to display time on the label +def time(): + string = strftime("%H : %M : %S") + lbl.config(text = string) + lbl.after(100, time) + +# Styling the label widget so that clock will look more attractive +lbl = Label(root, font = ('calibri', 40, 'bold')) + +# Placing clock at the centre of the tkinter window +lbl.pack(anchor = 'center') +time() +mainloop() \ No newline at end of file diff --git a/Dkek b/Dkek new file mode 100644 index 0000000..f6b91e0 --- /dev/null +++ b/Dkek @@ -0,0 +1 @@ +56 diff --git a/Dynamic typing b/Dynamic typing index eecbdd1..bf2aa9f 100644 --- a/Dynamic typing +++ b/Dynamic typing @@ -1,2 +1,2 @@ my_dogs = ['Sammy', 'Rosy'] -my_dogs +print(my_dogs) diff --git a/Eks b/Eks new file mode 100644 index 0000000..04f9fe4 --- /dev/null +++ b/Eks @@ -0,0 +1 @@ +59 diff --git a/Gal. py b/Gal. py index 98e6d43..4faa294 100644 --- a/Gal. py +++ b/Gal. py @@ -1 +1,2 @@ a=45 +c=a diff --git a/Game. Py b/Game. Py new file mode 100644 index 0000000..22fe190 --- /dev/null +++ b/Game. Py @@ -0,0 +1 @@ +a=10 diff --git a/Hack2.0.py b/Hack2.0.py index 6cda27b..dd6dd09 100644 --- a/Hack2.0.py +++ b/Hack2.0.py @@ -1 +1 @@ -print("lol") +print("lol! Hi") diff --git a/Hahaha34 b/Hahaha34 new file mode 100644 index 0000000..a787364 --- /dev/null +++ b/Hahaha34 @@ -0,0 +1 @@ +34 diff --git a/Hahsh2 b/Hahsh2 new file mode 100644 index 0000000..4099407 --- /dev/null +++ b/Hahsh2 @@ -0,0 +1 @@ +23 diff --git a/Happy.py b/Happy.py new file mode 100644 index 0000000..950795c --- /dev/null +++ b/Happy.py @@ -0,0 +1 @@ +print("I am very happy!") \ No newline at end of file diff --git a/Integer sequences/Euler's_Zig-Zag_Numbers.py b/Integer sequences/Euler's_Zig-Zag_Numbers.py new file mode 100644 index 0000000..b490216 --- /dev/null +++ b/Integer sequences/Euler's_Zig-Zag_Numbers.py @@ -0,0 +1,26 @@ +###################################### +### Euler ZigZag Numbers ### +###################################### + +#Example : 1 1 1 2 5 16 61 272 1385 7936 50521 353792 2702765 22368256 .... + + +def ZigZag(n): + fact = [0 for i in range(n+1)] + zig = [0 for i in range(n+1)] + fact[0] = 1 + for i in range(1, n+1): + fact[i] = fact[i-1]*i + + zig[0],zig[1] = 1,1 + + for i in range(2,n): + sum = 0 + for k in range(0, i): + sum += ((fact[i-1] // (fact[i-1-k] * fact[k])) * zig[k] * zig[i-1-k]) + zig[i] = sum//2 + return zig[n-1] + + +n = int(input("Enter the nth value to find : ")) +print(n,"th value in Euler's Zig-Zag Numbers is ",ZigZag(n)) diff --git a/Integer sequences/radical_of_an_integer.py b/Integer sequences/radical_of_an_integer.py new file mode 100644 index 0000000..d09f586 --- /dev/null +++ b/Integer sequences/radical_of_an_integer.py @@ -0,0 +1,79 @@ +### AUTHOR: Animesh +##Python3 Concept: Find radical of a positive integer +## GITHUB: https://github.com/animesh-77 + +''' this program prints the radical of an inputted positive integer +the definition of radical of an integer can be found here +https://en.wikipedia.org/wiki/Radical_of_an_integer +''' + + +def main(): + """ + main function of the program for inputs and functions calling. + + """ + + error_message = "Invalid input, please enter a non-negative integer" + + try: + # take user input + n = input("Please enter a non-negative integer: ") + + final= radical_integer(int(n)) + print ("radical of ",n," is = ",final) + + except KeyboardInterrupt: + print("----ABORTED!----") # If the program is stopped with ctrl+c + return + except TypeError: + print(error_message) # In case the user inputs something different from numbers + return + except ValueError: # In case user inputs a different value than integer + print(error_message) + return + except: + logging.exception("ERROR: ") # Shows any kind of message with the full stack trace in case we don't know what exception ocurred + + if int(n) < 0: # n cannot be less than zero + print(error_message) + return + + + + +def radical_integer(n): + + if (n==0): + return 0 # 0 has no factors + + rad=1 + for i in range(1,n+1): # loop from 1 to inputted number + if is_prime(i) and n%i==0: # if i is prime and a factor of n + rad*= i + + return rad + +def is_prime(n: int) -> bool: + """Primality test using 6k+-1 optimization. + https://en.wikipedia.org/wiki/Primality_test""" + if n <= 3: + return n > 1 + if n % 2 == 0 or n % 3 == 0: + return False + i = 5 + while i ** 2 <= n: + if n % i == 0 or n % (i + 2) == 0: + return False + i += 6 + return True + + + +if __name__ == "__main__": + main() + + + + + diff --git a/Integer sequences/sphenic_numbers.py b/Integer sequences/sphenic_numbers.py new file mode 100644 index 0000000..7817594 --- /dev/null +++ b/Integer sequences/sphenic_numbers.py @@ -0,0 +1,45 @@ +### AUTHOR: Animesh +##Python3 Concept: Find the nth sphenic number +## GITHUB: https://github.com/animesh-77 + +'''This program prints the nth sphenic number. The definition of sphenic number can be found here +https://en.wikipedia.org/wiki/Sphenic_number#:~:text=7%20References-,Definition,%2Dfree%203%2Dalmost%20primes. +for n=0 this prints the first sphenic number which is 30. +''' + + +import math + +def primes(n): + sieve = [True] * n + for i in range(3, int(n**0.5) + 1, 2): + if sieve[i]: + for j in range(2*i, n, i): + sieve[j] = False + return [2] + [i for i in range(3, n, 2) if sieve[i]] + +def isSpehnic(num): + p = primes(num) + # The very smallest combiantion of primes would contain 2 and 3 + # We only need to check numbers <= num/6 + p = [n for n in p if n <= num//6] + l = len(p) + for i in range(l - 2): + for j in range(i+1, l-1): + for k in range(j+1, l): + if p[i] * p[j] * p[k] == num: + return True + return False + +def main(): + n = int(input('Enter n: ')) + count = -1 + curr = 0 + while count < n: + curr += 1 + if isSpehnic(curr): + count += 1 + print(curr) + +if __name__ == "__main__": + main() diff --git a/MP3_Player.py b/MP3_Player.py new file mode 100644 index 0000000..1ef5447 --- /dev/null +++ b/MP3_Player.py @@ -0,0 +1,126 @@ +import pygame +from tkinter import * +from tkinter.filedialog import * +from mutagen.easyid3 import EasyID3 + +pygame.init() + +class MP3Window(Frame): + def __init__(self, gui): + super(MP3Window, self).__init__(gui) + + self.grid() + self.is_paused = False + self.playlist = list() + self.current_song = 0 + + self.btn1 = Button(self, text = "PLAY", command = self.play_music, bg = "MediumPurple1", width = 50) + self.btn1.grid(row = 0, column = 1) + + self.btn2 = Button(self, text = "PAUSE / Resume", command = self.pause_unpause, bg = "MediumPurple1", width = 50) + self.btn2.grid(row = 1, column = 1) + + + self.btn3 = Button(self, text = "REPLAY", command = self.rewind_music, bg = "MediumPurple1", width = 50) + self.btn3.grid(row = 2, column = 1) + + + self.btn4 = Button(self, text = "NEXT", command = self.next_song, bg = "MediumPurple1", width = 50) + self.btn4.grid(row = 3, column = 1) + + + self.btn5 = Button(self, text = "PREVIOUS", command = self.previous_song, bg = "MediumPurple1", width = 50) + self.btn5.grid(row = 4, column = 1) + + + self.btn6 = Button(self, text = "ADD TO PLAYLIST", command = self.add_to_playlist, bg = "MediumPurple1", width = 50) + self.btn6.grid(row = 5, column = 1) + + volume = IntVar() + self.VolumeSlider = Scale(self, length = 150, orient = "vertical", fg = "black", bg ="light blue", command = self.VolAdj, variable = volume, from_ = 100, to = 0) + self.VolumeSlider.grid(rowspan = 6, row = 0, column = 2) + self.VolumeSlider.set(50) + + self.song_name = Label(self, fg = "Black", font = ("Helvetica 12 bold italic",10), bg = "ivory2", wraplength=500) + self.song_name.grid(row = 6, column = 1) + + self.song_output = Text(self, wrap = WORD, width = 60) + self.song_output.grid(row = 7, column = 1) + + self.SONG_END = pygame.USEREVENT + 1 + + def add_to_playlist(self): + directory = askopenfilenames() + for song_directory in directory: + print(song_directory) + self.playlist.append(song_directory) + self.song_output.delete(0.0, END) + + for key, item in enumerate(self.playlist): + song = EasyID3(item) + song_info = (str(key + 1) + " : " + song["title"][0] + " - "+ song["artist"][0]) + self.song_output.insert(END, song_info + "\n") + + def song_info(self): + song = EasyID3(self.playlist[self.current_song]) + song_info = "Now playing: " + str(self.current_song + 1) + " " + str(song["title"]) + " - " + str(song["artist"]) + return song_info + + def play_music(self): + directory = self.playlist[self.current_song] + pygame.mixer.music.load(directory) + pygame.mixer.music.play(1, 0.0) + pygame.mixer.music.set_endevent(self.SONG_END) + self.is_paused = False + self.song_name["text"] = self.song_info() + + def pause_unpause(self): + if self.is_paused ==True: + pygame.mixer.music.unpause() + self.is_paused = False + elif self.is_paused == False: + pygame.mixer.music.pause() + self.is_paused = True + + def check_music(self): + for event in pygame.event.get(): + if event.type == self.SONG_END: + self.next_song() + + def get_next_song(self): + if self.current_song + 2 <= len(self.playlist): + return self.current_song + 1 + else: + return 0 + + def next_song(self): + self.current_song = self.get_next_song() + self.play_music() + + def get_previous_song(self): + if self.current_song - 1 >= 0: + return self.current_song - 1 + else: + return len(self.playlist) - 1 + + def previous_song(self): + self.current_song = self.get_previous_song() + self.play_music() + + def rewind_music(self): + pygame.mixer.music.rewind() + + def VolAdj(self, volume): + pygame.mixer.music.set_volume(int(volume) / 100) + +mp3_window = Tk() +mp3_window.geometry("550x500",) +mp3_window.title("MP3 Player") +mp3_window.resizable(0, 0) + +mp3_application = MP3Window(mp3_window) + +while True: + mp3_application.check_music() + mp3_application.update() + \ No newline at end of file diff --git a/Nam56e.py b/Nam56e.py new file mode 100644 index 0000000..8643cf6 --- /dev/null +++ b/Nam56e.py @@ -0,0 +1 @@ +89 diff --git a/Name34 b/Name34 new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/Name34 @@ -0,0 +1 @@ +24 diff --git a/Name69 b/Name69 new file mode 100644 index 0000000..8643cf6 --- /dev/null +++ b/Name69 @@ -0,0 +1 @@ +89 diff --git a/Priya1.py b/Priya1.py new file mode 100644 index 0000000..f328e12 --- /dev/null +++ b/Priya1.py @@ -0,0 +1,3 @@ +a=10 +b=20 +c=a+b diff --git a/Priya2.py b/Priya2.py new file mode 100644 index 0000000..6178079 --- /dev/null +++ b/Priya2.py @@ -0,0 +1 @@ +b diff --git a/Priya3.py b/Priya3.py new file mode 100644 index 0000000..f2ad6c7 --- /dev/null +++ b/Priya3.py @@ -0,0 +1 @@ +c diff --git a/Priya4.py b/Priya4.py new file mode 100644 index 0000000..7898192 --- /dev/null +++ b/Priya4.py @@ -0,0 +1 @@ +a diff --git a/Rahul34 b/Rahul34 new file mode 100644 index 0000000..4099407 --- /dev/null +++ b/Rahul34 @@ -0,0 +1 @@ +23 diff --git a/Rahul34ah b/Rahul34ah new file mode 100644 index 0000000..abac1ea --- /dev/null +++ b/Rahul34ah @@ -0,0 +1 @@ +47 diff --git a/Rhul47 b/Rhul47 new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/Rhul47 @@ -0,0 +1 @@ +36 diff --git a/Rl.py b/Rl.py new file mode 100644 index 0000000..b5489e5 --- /dev/null +++ b/Rl.py @@ -0,0 +1 @@ +69 diff --git a/Saurav.py b/Saurav.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/Saurav.py @@ -0,0 +1 @@ +print("hello world") diff --git a/Sgh b/Sgh new file mode 100644 index 0000000..a787364 --- /dev/null +++ b/Sgh @@ -0,0 +1 @@ +34 diff --git a/Tms b/Tms new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Tms @@ -0,0 +1 @@ + diff --git a/We.py b/We.py new file mode 100644 index 0000000..4099407 --- /dev/null +++ b/We.py @@ -0,0 +1 @@ +23 diff --git a/Whhw b/Whhw new file mode 100644 index 0000000..c3f407c --- /dev/null +++ b/Whhw @@ -0,0 +1 @@ +55 diff --git a/Wksk b/Wksk new file mode 100644 index 0000000..4099407 --- /dev/null +++ b/Wksk @@ -0,0 +1 @@ +23 diff --git a/aditya.py b/aditya.py new file mode 100644 index 0000000..ec7780c --- /dev/null +++ b/aditya.py @@ -0,0 +1 @@ +print('Hello, world!') diff --git a/akanksha.py b/akanksha.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/akanksha.py @@ -0,0 +1 @@ +print("hello world") diff --git a/akansha.py b/akansha.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/akansha.py @@ -0,0 +1 @@ +print("hello world") diff --git a/av.py b/av.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/av.py @@ -0,0 +1 @@ +print("hello world") diff --git a/bath.py b/bath.py new file mode 100644 index 0000000..eafb751 --- /dev/null +++ b/bath.py @@ -0,0 +1 @@ +print("I am going to take bath") \ No newline at end of file diff --git a/bye.py b/bye.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/bye.py @@ -0,0 +1 @@ +print("hello world") diff --git a/chetna.py b/chetna.py new file mode 100644 index 0000000..5c2bced --- /dev/null +++ b/chetna.py @@ -0,0 +1 @@ +print("hello world.") diff --git a/fibonacci.py b/fibonacci.py new file mode 100644 index 0000000..9c88279 --- /dev/null +++ b/fibonacci.py @@ -0,0 +1,27 @@ +#program to fibobacci series +#concept of the program: +""" first two values are taken from the user and they are added in a new variable +and the values of value a and value b are swapped to produce the number..""" + +def fibo(num1,num2): + #printing the first and second value.. + print(num1,end=" ") + print(num2,end=" ") + + for i in range(1,10): + num3=int(num1+num2)#new variable + #swapping the values + num1=num2 + num2=num3 + + #printting the result :) + print(num3,end=" ") + + #inputs and calling the function +num1=int(input("enter the number: ")) +num2=int(input("enter the second value: ")) +fibo(num1,num2) + + + + diff --git a/go2.py b/go2.py new file mode 100644 index 0000000..7ed940c --- /dev/null +++ b/go2.py @@ -0,0 +1 @@ +print("Go to park") \ No newline at end of file diff --git a/god.py b/god.py index 02aca1c..88c154d 100644 --- a/god.py +++ b/god.py @@ -1 +1 @@ -print("HELLO") +print("HELLO WORLD") diff --git a/hey.py b/hey.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/hey.py @@ -0,0 +1 @@ +print("hello world") diff --git a/improve.py b/improve.py new file mode 100644 index 0000000..2211aaf --- /dev/null +++ b/improve.py @@ -0,0 +1 @@ +print("Improved version") \ No newline at end of file diff --git a/instagram profile pic downloader.py b/instagram profile pic downloader.py new file mode 100644 index 0000000..f739dfe --- /dev/null +++ b/instagram profile pic downloader.py @@ -0,0 +1,7 @@ +import instaloader + +ig=instaloader.Instaloader() + +dp=input("Enter user name of id : ") + +ig.download_profile(dp, profile_pic_only=True) diff --git a/kumar.py b/kumar.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/kumar.py @@ -0,0 +1 @@ +print("hello world") diff --git a/lock1.py b/lock1.py new file mode 100644 index 0000000..22fe190 --- /dev/null +++ b/lock1.py @@ -0,0 +1 @@ +a=10 diff --git a/lock2.py b/lock2.py new file mode 100644 index 0000000..033c2d6 --- /dev/null +++ b/lock2.py @@ -0,0 +1 @@ +a=100 diff --git a/lock3.py b/lock3.py new file mode 100644 index 0000000..620e8a5 --- /dev/null +++ b/lock3.py @@ -0,0 +1 @@ +a=110 diff --git a/lock4.py b/lock4.py new file mode 100644 index 0000000..8b28cc2 --- /dev/null +++ b/lock4.py @@ -0,0 +1 @@ +a=120 diff --git a/name b/name new file mode 100644 index 0000000..a787364 --- /dev/null +++ b/name @@ -0,0 +1 @@ +34 diff --git a/name34 b/name34 new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/name34 @@ -0,0 +1 @@ +. diff --git a/name35 b/name35 new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/name35 @@ -0,0 +1 @@ +. diff --git a/name36 b/name36 new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/name36 @@ -0,0 +1 @@ +. diff --git a/nobody.py b/nobody.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/nobody.py @@ -0,0 +1 @@ +print("hello world") diff --git a/paridhi.py b/paridhi.py new file mode 100644 index 0000000..6a7daa8 --- /dev/null +++ b/paridhi.py @@ -0,0 +1,2 @@ +print("HELLO WORLD") +57 diff --git a/paridhi1.py b/paridhi1.py new file mode 100644 index 0000000..39eb5f2 --- /dev/null +++ b/paridhi1.py @@ -0,0 +1,2 @@ +99 +print("HELLO WORLD") diff --git a/paridhi2.py b/paridhi2.py new file mode 100644 index 0000000..88c154d --- /dev/null +++ b/paridhi2.py @@ -0,0 +1 @@ +print("HELLO WORLD") diff --git a/paridhi3.py b/paridhi3.py new file mode 100644 index 0000000..773b21c --- /dev/null +++ b/paridhi3.py @@ -0,0 +1,2 @@ +0000 +print("HELLO WORLD") diff --git a/parzeen2 b/parzeen2 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/parzeen2 @@ -0,0 +1 @@ + diff --git a/parzeen22 b/parzeen22 new file mode 100644 index 0000000..8cf5c1a --- /dev/null +++ b/parzeen22 @@ -0,0 +1 @@ +86 diff --git a/parzeen24 b/parzeen24 new file mode 100644 index 0000000..0e50ea7 --- /dev/null +++ b/parzeen24 @@ -0,0 +1 @@ +ws diff --git a/pelindrome.py b/pelindrome.py new file mode 100644 index 0000000..5f848d6 --- /dev/null +++ b/pelindrome.py @@ -0,0 +1,14 @@ +# function which return reverse of a string + +def isPalindrome(s): + return s == s[::-1] + + +# Driver code +s = "malayalam" +ans = isPalindrome(s) + +if ans: + print("Yes") +else: + print("No") diff --git a/rana.py b/rana.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/rana.py @@ -0,0 +1 @@ +print("hello world") diff --git a/research.py b/research.py new file mode 100644 index 0000000..3b5babe --- /dev/null +++ b/research.py @@ -0,0 +1,2 @@ +print("Hi, I am research") +45 diff --git a/rock1.py b/rock1.py new file mode 100644 index 0000000..22fe190 --- /dev/null +++ b/rock1.py @@ -0,0 +1 @@ +a=10 diff --git a/rock2.py b/rock2.py new file mode 100644 index 0000000..61eb08d --- /dev/null +++ b/rock2.py @@ -0,0 +1 @@ +a=109 diff --git a/rock3.py b/rock3.py new file mode 100644 index 0000000..434d08f --- /dev/null +++ b/rock3.py @@ -0,0 +1,2 @@ +a=2121 +b=1000 diff --git a/rock4.py b/rock4.py new file mode 100644 index 0000000..c714855 --- /dev/null +++ b/rock4.py @@ -0,0 +1 @@ +a=8989 diff --git a/saturday.py b/saturday.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/saturday.py @@ -0,0 +1 @@ +print("hello world") diff --git a/verma.py b/verma.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/verma.py @@ -0,0 +1 @@ +print("hello world")