diff --git a/A solution to project euler problem 3.py b/A solution to project euler problem 3.py index 194ab996a18..3b34b655083 100644 --- a/A solution to project euler problem 3.py +++ b/A solution to project euler problem 3.py @@ -7,7 +7,7 @@ """ -def solution(n: int) -> int: +# def solution(n: int) -> int: def solution(n: int = 600851475143) -> int: """Returns the largest prime factor of a given number n. >>> solution(13195) diff --git a/BlackJack_game/blackjack.py b/BlackJack_game/blackjack.py index fc0a2e00722..cb09363cb30 100644 --- a/BlackJack_game/blackjack.py +++ b/BlackJack_game/blackjack.py @@ -1,4 +1,4 @@ -master +# master # BLACK JACK - CASINO A GAME OF FORTUNE!!! import time @@ -6,7 +6,7 @@ # PYTHON CODE BASE -master +# master import random deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11] * 4 diff --git a/Decimal_To_Binary.py b/Decimal_To_Binary.py index 0db88114b8f..e8f73abb252 100644 --- a/Decimal_To_Binary.py +++ b/Decimal_To_Binary.py @@ -1,5 +1,5 @@ -patch-2 +# patch-255 decimal_accuracy = 7 def dtbconverter(num): @@ -40,6 +40,7 @@ def dtbconverter(num): #i think this code have not proper comment and noe this is easy to understand +''' ======= Program: Decimal to Binary converter. @@ -62,4 +63,4 @@ def DecimalToBinary(num): # Calling function DecimalToBinary(dec_val) -master +# master diff --git a/JARVIS/JARVIS.py b/JARVIS/JARVIS.py index 3889cfb007d..dc0947790a8 100644 --- a/JARVIS/JARVIS.py +++ b/JARVIS/JARVIS.py @@ -11,12 +11,12 @@ # import modules from datetime import datetime # datetime module supplies classes for manipulating dates and times import subprocess # subprocess module allows you to spawn new processes -master +# master import pyjokes -======= +# ======= from playsound import * #for sound output -master +# master import speech_recognition as sr # speech_recognition Library for performing speech recognition with support for Google Speech Recognition, etc.. # pip install pyttsx3 @@ -63,7 +63,7 @@ def voice(p): # Run Application with Voice Command Function -only_jarvis +# only_jarvis class Jarvis: def __init__(self, Q): self.query = Q @@ -110,9 +110,9 @@ def get_app(self): print(task) return -======= +# ======= def get_app(Q): - master + # master if Q == "time": print(datetime.now()) x=datetime.now() @@ -131,7 +131,7 @@ def get_app(Q): subprocess.call(['cmd.exe']) elif Q == "browser": subprocess.call(['C:\Program Files\Internet Explorer\iexplore.exe']) -patch-1 +# patch-1 elif Q == "open youtube": webbrowser.open("https://www.youtube.com/") # open youtube elif Q == "open google": @@ -151,27 +151,27 @@ def get_app(Q): except Exception as e: print(e) speak("Sorray i am not send this mail") -======= - master - elif Q=="Take screenshot" +# ======= +# master + elif Q=="Take screenshot": snapshot=ImageGrab.grab() - drive_letter = "C:\\" - folder_name = r'downloaded-files' - folder_time = datetime.datetime.now().strftime("%Y-%m-%d_%I-%M-%S_%p") - extention = '.jpg' - folder_to_save_files = drive_letter + folder_name + folder_time + extention - snapshot.save(folder_to_save_files) + drive_letter = "C:\\" + folder_name = r'downloaded-files' + folder_time = datetime.datetime.now().strftime("%Y-%m-%d_%I-%M-%S_%p") + extention = '.jpg' + folder_to_save_files = drive_letter + folder_name + folder_time + extention + snapshot.save(folder_to_save_files) elif Q=="Jokes": print(pyjokes.get_joke()) -master +# master else: engine.say("Sorry Try Again") engine.runAndWait() -======= -======= +# ======= +# ======= apps = { "time": datetime.now(), @@ -183,17 +183,17 @@ def get_app(Q): "cmd": "cmd.exe", "browser": "C:\Program Files\Internet Explorer\iexplore.exe" } -master +# master for app in apps: if app == Q.lower(): subprocess.call([apps[app]]) break - master + # master else: engine.say("Sorry Try Again") engine.runAndWait() -master +# master return # Call get_app(Query) Func. Jarvis(Query).get_app diff --git a/Password Generator/pass_gen.py b/Password Generator/pass_gen.py index a6b6299bbcc..3cf7cf300c9 100644 --- a/Password Generator/pass_gen.py +++ b/Password Generator/pass_gen.py @@ -19,7 +19,7 @@ def gen_password(sequence, passlength=8): password = ''.join((secrets.choice(sequence) for i in range(passlength))) return password - class Interface(): +class Interface(): has_characters={ "lowercase":True, "uppercase":True, diff --git a/Print_List_of_Odd_Numbers.py b/Print_List_of_Odd_Numbers.py index 1df0ec583c4..a65dc289f0b 100644 --- a/Print_List_of_Odd_Numbers.py +++ b/Print_List_of_Odd_Numbers.py @@ -1,4 +1,4 @@ -master +# master #Another best method to do this n=map(list(int,input().split())) @@ -9,7 +9,7 @@ # CALCULATE NUMBER OF ODD NUMBERS # CALCULATE NUMBER OF ODD NUMBERS WITHIN A GIVEN LIMIT -master +# master n = int(input("Enter the limit : ")) # user input diff --git a/Quick_Sort.py b/Quick_Sort.py index 14e696ca285..a4f485749d8 100644 --- a/Quick_Sort.py +++ b/Quick_Sort.py @@ -22,16 +22,16 @@ def quickSort(arr, low, high): print("Initial array is:", arr) n = len(arr) quickSort(arr, 0, n - 1) -patch-1 -print("Sorted array is:", arr) -======= +# patch-1 +# print("Sorted array is:", arr) +# ======= print("Sorted array is:") -patch-4 -for i in range(0,n): -======= +# patch-4 +# for i in range(0,n): +# ======= for i in range(0,len(arr)): -master +# master print(arr[i],end=" ") #your code is best but now it is easy to understand -master +# master diff --git a/SimpleCalculator.py b/SimpleCalculator.py index 63f86cd9dd9..21e1f482819 100644 --- a/SimpleCalculator.py +++ b/SimpleCalculator.py @@ -14,7 +14,7 @@ def divide(a, b): except ZeroDivisionError: return "Zero Division Error" - def power(a,b): +def power(a,b): return a**b def main(): diff --git a/To print series 1,12,123,1234......py b/To print series 1,12,123,1234......py index 5e94e3d963a..168388736d5 100644 --- a/To print series 1,12,123,1234......py +++ b/To print series 1,12,123,1234......py @@ -1,4 +1,4 @@ -master +# master def num(a): # initialising starting number @@ -36,7 +36,7 @@ def num(a): a = 5 num(a) -======= +# ======= # 1-12-123-1234 Pattern up to n lines n = int(input("Enter number of rows: ")) @@ -46,4 +46,4 @@ def num(a): print(j, end="") print() -master +# master diff --git a/aj.py b/aj.py index eb81e3cabdb..159b0c615e2 100644 --- a/aj.py +++ b/aj.py @@ -7,6 +7,6 @@ def Repeat(x): if x[i] == x[j] and x[i] not in repeated: repeated.append(x[i]) return repeated - ist1 = [10, 20, 30, 20, 20, 30, 40, +list1 = [10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20] -print (Repeat(list1)) +print(Repeat(list1)) diff --git a/binod.py b/binod.py index 113b72f70a4..68d32ea7d3c 100644 --- a/binod.py +++ b/binod.py @@ -1,14 +1,14 @@ -patch-1 +# patch-1 import os #The OS module in python provides functions for interacting with the operating system -patch-3 +# patch-3 # function to check if 'binod' is present in the file. -def checkBinod(file): -======= +# def checkBinod(file): +# ======= -def checkBinod(file): #this function will check there is any 'Binod' text in file or not - with open(file, "r") as f: #we are opening file in read mode and using 'with' so need to take care of close() -======= +# def checkBinod(file): #this function will check there is any 'Binod' text in file or not +# with open(file, "r") as f: #we are opening file in read mode and using 'with' so need to take care of close() +# ======= import time import os #Importing our Bindoer @@ -16,9 +16,9 @@ def checkBinod(file): #this function will check there is any 'Binod' text time.sleep(1) print("Chaliye Binod Karte Hai!") def checkBinod(file):#Trying to find Binod In File Insted Of Manohar Ka Kotha - master + # master with open(file, "r") as f: - master + # master fileContent = f.read() if 'binod' in fileContent.lower(): print( diff --git a/Digital Clock/digital_clock.py b/digital_clock.py similarity index 94% rename from Digital Clock/digital_clock.py rename to digital_clock.py index bb4e0a26545..d5a4a12c3d2 100644 --- a/Digital Clock/digital_clock.py +++ b/digital_clock.py @@ -1,11 +1,11 @@ -master +# master # importing whole module # use Tkinter to show a digital clock # using python code base import time #because we need digital clock , so we are importing the time library. - master +# master from tkinter import * from tkinter.ttk import * @@ -17,11 +17,11 @@ root = Tk() root.title('Clock') -master +# master # This function is used to # display time on the label -def time(): +def def_time(): string = strftime('%H:%M:%S %p') lbl.config(text = string) lbl.after(1000, time) @@ -35,10 +35,10 @@ def time(): # Placing clock at the centre # of the tkinter window lbl.pack(anchor = 'center') -time() +def_time() mainloop() -======= +# ======= label = Label(root, font=("Arial", 30, 'bold'), bg="black", fg="white", bd =30) label.grid(row =0, column=1) @@ -63,4 +63,4 @@ def dig_clock(): dig_clock() root.mainloop() -master +# master diff --git a/helloworld.py b/helloworld.py index 6cbb4789505..85df0a7c2b0 100644 --- a/helloworld.py +++ b/helloworld.py @@ -1,4 +1,4 @@ -master +# master # This program prints Hello, world! import time @@ -11,7 +11,7 @@ time.sleep(1) print("Here We Go!") time.sleep(1) -master +# master print("Hello World!") time.sleep(1) print("A Quick Tip!") @@ -21,11 +21,11 @@ # in c -> printf("Hello World!"); # in java -> System.out.println("Hello World!"); # in c++ -> cout << "Hello World"; -master +# master # in javascript - > console.log("Hello World"); # in javascript - > console.log("Hello World") or document.write("Hello World!") time.sleep(2) print("All The Best!") #Adios! -master +# master diff --git a/json_to_table.py b/json_to_table.py index d2bf7687b26..50b83c30e07 100644 --- a/json_to_table.py +++ b/json_to_table.py @@ -1,8 +1,8 @@ import json import pandas as pd -//jsondata is a collection of data in json format +# //jsondata is a collection of data in json format -//Used panndas dataframe to convert json data to dataframes table +# //Used panndas dataframe to convert json data to dataframes table jdata = json.loads(jsondata) df = pd.DataFrame(jdata) -//print(df.T) +# //print(df.T) diff --git a/news_articles__scraper.py b/news_articles__scraper.py index cec88e1a615..89b98ff0ac4 100644 --- a/news_articles__scraper.py +++ b/news_articles__scraper.py @@ -19,6 +19,7 @@ from newspaper import Article import pickle import re +import sys # Extracting links for all the pages (1 to 158) of boomlive fake news section fakearticle_links = [] diff --git a/pygame.py b/pygame.py index d0b620bbea1..e7b11b34fda 100644 --- a/pygame.py +++ b/pygame.py @@ -1,4 +1,4 @@ -author-slayking1965 +# author-slayking1965 """ This is a game very similar to stone paper scissor In this game :