From 9e829b01692ee3aae53d91818800dbcd9fd7aa0d Mon Sep 17 00:00:00 2001 From: rakesh kumar Date: Wed, 25 Dec 2019 11:19:27 +0530 Subject: [PATCH] simple changes --- JSON/first.py | 0 Tkinter/mouseClick.py | 2 +- functions/recursion/fibonacci.py | 16 ++++++++++++++++ functions/recursion/sum_list.py | 8 ++++++++ knowledge.py | 18 ++++++++++++++++++ numpy/intro1-.py | 4 ++++ webscraper/youtubeDownloader.py | 4 ++-- websites.py | 1 + 8 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 JSON/first.py create mode 100644 functions/recursion/fibonacci.py create mode 100644 functions/recursion/sum_list.py create mode 100644 knowledge.py diff --git a/JSON/first.py b/JSON/first.py new file mode 100644 index 0000000..e69de29 diff --git a/Tkinter/mouseClick.py b/Tkinter/mouseClick.py index 0ebfeb9..6e5f2ef 100644 --- a/Tkinter/mouseClick.py +++ b/Tkinter/mouseClick.py @@ -11,7 +11,7 @@ def middleClick(event): root = Tk() -frame = Frame(root, width=400, height=400) +frame = Frame(root, width=800, height=400) frame.bind('',leftClick) frame.bind('',middleClick) frame.bind('',rightClick) diff --git a/functions/recursion/fibonacci.py b/functions/recursion/fibonacci.py new file mode 100644 index 0000000..0bf2b15 --- /dev/null +++ b/functions/recursion/fibonacci.py @@ -0,0 +1,16 @@ +# program to find out nth fibonacci number using recursion +# made by : rakesh kumar +# last compiled : 20-12-2018 + + +def fibonacci(n): + if(n==1): + return 0 + elif(n==2): + return 1 + else: + return fibonacci(n-1)+fibonacci(n-2) + +if __name__ == "__main__": + for x in range(1,21): + print(fibonacci(x),end=" ") diff --git a/functions/recursion/sum_list.py b/functions/recursion/sum_list.py new file mode 100644 index 0000000..f9ecd00 --- /dev/null +++ b/functions/recursion/sum_list.py @@ -0,0 +1,8 @@ +def sum1(l): + pass + + + +if __name__ == "__main__": + li = [1,2,4,5,6,7] + print(li) diff --git a/knowledge.py b/knowledge.py new file mode 100644 index 0000000..fc05faa --- /dev/null +++ b/knowledge.py @@ -0,0 +1,18 @@ +from turtle import * +from random import randint +bgcolor('black') +x = 1 +speed(0) +while x < 400: + + r = randint(0, 255) + g = randint(0, 255) + b = randint(0, 255) + + colormode(255) + pencolor(r, g, b) + fd(50 + x) + rt(90.991) + x = x+1 + +exitonclick() diff --git a/numpy/intro1-.py b/numpy/intro1-.py index e69de29..f590b59 100644 --- a/numpy/intro1-.py +++ b/numpy/intro1-.py @@ -0,0 +1,4 @@ +import numpy as np + +ar = np.array([1,2,34,5]) +print(ar) \ No newline at end of file diff --git a/webscraper/youtubeDownloader.py b/webscraper/youtubeDownloader.py index 81f1e96..246e274 100644 --- a/webscraper/youtubeDownloader.py +++ b/webscraper/youtubeDownloader.py @@ -1,8 +1,8 @@ from __future__ import unicode_literals import youtube_dl # import urllib -# import shutil +# import shutil ydl_opts = {} with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download( - ['https://www.youtube.com/watch?v=3qti7Vof_7Q&list=PLbGui_ZYuhiiaQjuOfvgx_-gzVBlCxrk0&index=1']) + ['https://www.youtube.com/watch?v=skG_36Abhos']) diff --git a/websites.py b/websites.py index c9086c7..5357e32 100644 --- a/websites.py +++ b/websites.py @@ -1,5 +1,6 @@ # !python36 import webbrowser + webbrowser.open_new_tab("http://www.binarynote.com") webbrowser.open_new_tab("https://www.clickbank.com") webbrowser.open_new_tab("https://account.shareasale.com/a-login.cfm?")