diff --git a/Python Basic/Bubble Sort .py b/Python Basic/Bubble Sort .py index b7a84e9..e5bb0a9 100644 --- a/Python Basic/Bubble Sort .py +++ b/Python Basic/Bubble Sort .py @@ -1,3 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : Buuble Sort +''' def sort(nums): for i in range(len(nums)-1,0,-1): diff --git a/Python Basic/Convert Number to Binary.py b/Python Basic/Convert Number to Binary.py new file mode 100644 index 0000000..b9ea6df --- /dev/null +++ b/Python Basic/Convert Number to Binary.py @@ -0,0 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : Change Number TO Binary +''' + +num = 23 +print(bin(num)) \ No newline at end of file diff --git a/Python Basic/Magic Method.py b/Python Basic/Magic Method.py index e69de29..6fada1c 100644 --- a/Python Basic/Magic Method.py +++ b/Python Basic/Magic Method.py @@ -0,0 +1,4 @@ +''' +@author : CodePerfectPlus +@Topic : Magic Method +''' \ No newline at end of file diff --git a/Python Basic/Pattern Searching algorithms.py b/Python Basic/Pattern Searching algorithms.py index 47b3562..646fafc 100644 --- a/Python Basic/Pattern Searching algorithms.py +++ b/Python Basic/Pattern Searching algorithms.py @@ -1,4 +1,7 @@ -''' Python3 program for Naive Pattern +''' +@author : CodePerfectPlus +@Topic : Pattern Searching +Python3 program for Naive Pattern Searching algorithm ''' def search(pat, txt): @@ -26,4 +29,3 @@ def search(pat, txt): search(pat, txt) # This code is contributed -# by PrinciRaj1992 diff --git a/Python Basic/Python linear search p.py.py b/Python Basic/Python linear search p.py.py index 85951f8..5667cb9 100644 --- a/Python Basic/Python linear search p.py.py +++ b/Python Basic/Python linear search p.py.py @@ -1,4 +1,7 @@ -''' Linear serach algorithm +''' +@author : CodePerfectPlus +@Topic : Buuble Sort +Linear serach algorithm 1. worst case 2.average case 3.Best case diff --git a/Python basic/function3.py b/Python Basic/Recursion.py similarity index 80% rename from Python basic/function3.py rename to Python Basic/Recursion.py index 4e50422..59b26af 100644 --- a/Python basic/function3.py +++ b/Python Basic/Recursion.py @@ -1,5 +1,6 @@ ''' -Python recursion +@author : CodePerfectPlus +@Topic : Recursion ''' def recursion_01(k): if(k>0): diff --git a/Python Basic/Regex.py b/Python Basic/Regex.py index 8540919..73a3840 100644 --- a/Python Basic/Regex.py +++ b/Python Basic/Regex.py @@ -1,3 +1,8 @@ +''' +@author : CodePerfectPlus +@Topic : Regex +''' + import re #Check if the string starts with "The" and ends with "Spain": diff --git a/Python Basic/Selection Sort.py b/Python Basic/Selection Sort.py index febfd9c..432fc1f 100644 --- a/Python Basic/Selection Sort.py +++ b/Python Basic/Selection Sort.py @@ -1,3 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : Selection Sort +''' def sort(nums): for i in range(len(nums)-1): minpos = i diff --git a/Python Basic/args and kwargs.py b/Python Basic/args and kwargs.py index 1d6abed..7cece8e 100644 --- a/Python Basic/args and kwargs.py +++ b/Python Basic/args and kwargs.py @@ -1,3 +1,8 @@ +''' +@author : CodePerfectPlus +@Topic : Args And Kwargs in Python +''' + def student(*args, **kwargs): print(args) print(kwargs) diff --git a/Python Basic/enumerate fun.py b/Python Basic/enumerate fun.py index 1bde61d..46fd732 100644 --- a/Python Basic/enumerate fun.py +++ b/Python Basic/enumerate fun.py @@ -1,3 +1,10 @@ +''' +@author : CodePerfectPlus +@Topic : Enumerate +''' + + + example = ['left', 'right ', 'up', 'down'] for i,j in enumerate(example): diff --git a/Python Basic/function basic.py b/Python Basic/function basic.py index ec4f8f8..fb8cdf6 100644 --- a/Python Basic/function basic.py +++ b/Python Basic/function basic.py @@ -1,3 +1,8 @@ +''' +@author : CodePerfectPlus +@Topic : Funtion Basic +''' + def welcome(greeting): return "Hello and {}".format(greeting) diff --git a/Python Basic/python Linear search.py b/Python Basic/python Linear search.py deleted file mode 100644 index e69de29..0000000 diff --git a/Python Basic/python_class.py b/Python Basic/python_class.py index d393c85..cd9757b 100644 --- a/Python Basic/python_class.py +++ b/Python Basic/python_class.py @@ -1,3 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : Python Class +''' class Empl(object): """docstring for Empl""" diff --git a/Python basic/Function in python.py b/Python basic/Function in python.py index b300c18..fb7f84d 100644 --- a/Python basic/Function in python.py +++ b/Python basic/Function in python.py @@ -1,4 +1,6 @@ ''' +@author : CodePerfectPlus +@Topic : Function function in pyhton declared by def keyword, I will discuss about function in detilas. IF-Else statements for check divisibility ''' diff --git a/Python basic/Nested IF Else.py b/Python basic/Nested IF Else.py deleted file mode 100644 index e69de29..0000000 diff --git a/Python basic/Sep Parameter in python.py b/Python basic/Sep Parameter in python.py index 1cd6258..d0bda36 100644 --- a/Python basic/Sep Parameter in python.py +++ b/Python basic/Sep Parameter in python.py @@ -1,4 +1,6 @@ ''' +@author : CodePerfectPlus +@Topic : seprator The seprator between the argument to print() function in python in space by default, which can be modified and can be made to any chracter. we can use dash, comm, colan and semicolan instead of deafault space. diff --git a/Python basic/While_loop.py b/Python basic/While_loop.py index 8a9d170..21cf6c0 100644 --- a/Python basic/While_loop.py +++ b/Python basic/While_loop.py @@ -1,5 +1,7 @@ -'''while Loop''' -'''github''' +''' +@author : CodePerfectPlus +@Topic : While Loop +while Loop''' condition=2 diff --git a/Python basic/condtionals and booleans.py b/Python basic/condtionals and booleans.py index 1a322b3..03c610a 100644 --- a/Python basic/condtionals and booleans.py +++ b/Python basic/condtionals and booleans.py @@ -1,8 +1,11 @@ ''' -Function Method Using ClassMethod. +@author : CodePerfectPlus +@Topic : Function Method Using ClassMethod. ''' + + class Employee: """A sample Employee class""" diff --git a/Python basic/for loop.py b/Python basic/for loop.py index 2e493c2..2c50636 100644 --- a/Python basic/for loop.py +++ b/Python basic/for loop.py @@ -1,4 +1,8 @@ -'''For Loop +''' + +@author : CodePerfectPlus +@Topic : For Loop + For loop function in python is same as while loop, but it mostly use at finite no. to iterate list and string diff --git a/Python basic/function2.py b/Python basic/function2.py index af08cde..ae07c81 100644 --- a/Python basic/function2.py +++ b/Python basic/function2.py @@ -1,3 +1,8 @@ +''' +@author : CodePerfectPlus +@Topic : Function -2 +''' + def my_func(food): for x in food: print(x) diff --git a/Python basic/function_parameter.py b/Python basic/function_parameter.py index faa023a..5b75180 100644 --- a/Python basic/function_parameter.py +++ b/Python basic/function_parameter.py @@ -1,3 +1,8 @@ +''' +@author : CodePerfectPlus +@Topic : parameter OF Fucntion +''' + def function(num1,num2=5): #we define value for num print(num1,num2) diff --git a/Python basic/generator_function.py b/Python basic/generator_function.py index 4a48668..8863d43 100644 --- a/Python basic/generator_function.py +++ b/Python basic/generator_function.py @@ -1,3 +1,9 @@ +''' +@author : CodePerfectPlus +@Topic : Generator +''' + + right_combination = (2,3,5) for c1 in range(10): diff --git a/Python basic/global_local Variable.py b/Python basic/global_local Variable.py index f70d419..4aee320 100644 --- a/Python basic/global_local Variable.py +++ b/Python basic/global_local Variable.py @@ -1,4 +1,7 @@ -'''A Global Variable is one that can be accessed anywhere. +''' +@author : CodePerfectPlus +@Topic : Global And Local Variable +A Global Variable is one that can be accessed anywhere. a local Variable is the opposite, it can only be accessed within its frame. ''' diff --git a/Python basic/if_else_statements.py b/Python basic/if_else_statements.py index 58ab77d..a5698dc 100644 --- a/Python basic/if_else_statements.py +++ b/Python basic/if_else_statements.py @@ -1,3 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : If-Else Statement +''' a=5 b=12 if a>b: diff --git a/Python basic/list and tuple.py b/Python basic/list and tuple.py index b3842eb..2038414 100644 --- a/Python basic/list and tuple.py +++ b/Python basic/list and tuple.py @@ -1,4 +1,7 @@ -''' List and Tuple in Python are just like array to store data +''' +@author : CodePerfectPlus +@Topic : List and Tuple +List and Tuple in Python are just like array to store data List are mutable and Tuple are immutable that means we can't change,modify a tuple. generally tuple is used when we have to save some data as like "Ip address", "Mac address" diff --git a/Python basic/python_classes.py b/Python basic/python_classes.py index d4ff8fb..ae82da4 100644 --- a/Python basic/python_classes.py +++ b/Python basic/python_classes.py @@ -1,4 +1,7 @@ -''' class are group of functions. +''' +@author : CodePerfectPlus +@Topic : Python Classes +class are group of functions. classes quickly work their way into "intermediate" Programing. ''' diff --git a/Python basic/python_function.py b/Python basic/python_function.py index 5d2f812..9e60ce5 100644 --- a/Python basic/python_function.py +++ b/Python basic/python_function.py @@ -1,4 +1,7 @@ -''' Python Function Excxample''' +''' +@author : CodePerfectPlus +@Topic : python function +Python Function Excxample''' def fname(): print("Hello") diff --git a/Python basic/python_json.py b/Python basic/python_json.py index 287f298..812703a 100644 --- a/Python basic/python_json.py +++ b/Python basic/python_json.py @@ -1,3 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : Python Json +''' import json x = { diff --git a/Python basic/range_function.py b/Python basic/range_function.py index 51734b4..590a300 100644 --- a/Python basic/range_function.py +++ b/Python basic/range_function.py @@ -1,2 +1,6 @@ +''' +@author : CodePerfectPlus +@Topic : Range Function +''' for x in range(1,10): print(x) diff --git a/Python basic/reverse palindrome.py b/Python basic/reverse palindrome.py index ce2cf44..03d643b 100644 --- a/Python basic/reverse palindrome.py +++ b/Python basic/reverse palindrome.py @@ -1,4 +1,7 @@ -''' +''' +@author : CodePerfectPlus +@Topic : Palindrome + python programe to check if a string is palindrome or not''' diff --git a/Python basic/simple_additon_function.py b/Python basic/simple_additon_function.py index bff9e35..b220458 100644 --- a/Python basic/simple_additon_function.py +++ b/Python basic/simple_additon_function.py @@ -1,4 +1,6 @@ ''' +@author : CodePerfectPlus +@Topic : Simple addition function Using Function to add Two integer. ''' diff --git a/Python basic/statistics_module.py b/Python basic/statistics_module.py index bf8cca1..c6fbfdf 100644 --- a/Python basic/statistics_module.py +++ b/Python basic/statistics_module.py @@ -1,4 +1,8 @@ -'''statistics Module can only be apply on python 3''' +''' +@author : CodePerfectPlus +@Topic : Statistics Module + +statistics Module can only be apply on python 3''' diff --git a/Python basic/user_input.py b/Python basic/user_input.py index e734f30..1d6ad73 100644 --- a/Python basic/user_input.py +++ b/Python basic/user_input.py @@ -1,2 +1,7 @@ +''' +@author : CodePerfectPlus +@Topic : User Input +''' x=input('What is Your Name ?: ') print('Hello',x) +