Skip to content

Commit f8bbd0b

Browse files
committed
Python Programs
1 parent 0a97fbc commit f8bbd0b

File tree

10 files changed

+11
-1
lines changed

10 files changed

+11
-1
lines changed

Programs/P01_hello.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#This program prints the entered message
1+
# Author: OMKAR PATHAK
2+
# This program prints the entered message
23

34
def justPrint(text):
45
'''This function prints the text passed as argument to this function'''

Programs/P02_VariableScope.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This programs shows the rules for variable scope
23

34
# LEGB Rule: Local, Enclosing, Global, Built-in

Programs/P03_ListsOperations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program gives examples about various list operations
23

34
#Syntax: list[start: end: step]

Programs/P04_Factorial.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program finds the favtorial of the specified numbers
23

34
def factorial(number):

Programs/P05_Pattern.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program prints various patterns
23

34
def pattern1(level):

Programs/P06_CharCount.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program checks for the character frequency in the given string
23

34
def charFrequency(userInput):

Programs/P07_PrimeNumber.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program checks whether the entered number is prime or not
23

34
def checkPrime(number):

Programs/P08_Fibonacci.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program calculates the fibonacci series till the n-th term
23

34
def fibonacci(number):

Programs/P09_Factorial.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program calculates the factorial of a given number
23

34
def factorial(number):

Programs/P10_LCM.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Author: OMKAR PATHAK
12
#This program calculates the LCM of the two numbers entered by the user
23

34
def LCM(number1, number2):

0 commit comments

Comments
 (0)