diff --git a/Python/capitalize_each_word.py b/Python/capitalize_each_word.py index e1e77e8..d7584dd 100644 --- a/Python/capitalize_each_word.py +++ b/Python/capitalize_each_word.py @@ -8,7 +8,7 @@ import string -def solve(s): +def solve(s): #(Function is to capitalise first letter of each word ) for x in s[:].split(): s = s.replace(x, x.capitalize()) return s @@ -17,9 +17,9 @@ def solve(s): if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') - s = input() + s = input() #(Input a string) - result = solve(s) + result = solve(s) #(Function is called by passing the parameter s) fptr.write(result + '\n') diff --git a/Python/nested_list_second_lowest.py b/Python/nested_list_second_lowest.py index 6f5edc3..3103ae9 100644 --- a/Python/nested_list_second_lowest.py +++ b/Python/nested_list_second_lowest.py @@ -1,16 +1,16 @@ -marksheet=[] -scorelist=[] +marksheet=[] # creates a list marksheet +scorelist=[] # creates a list scorelist if __name__ == '__main__': for _ in range(int(input())): - name = input() - score = float(input()) + name = input("Entre the name:") + score = float(input("Enter the score:")) marksheet+=[[name,score]] scorelist+=[score] scorelist = list(dict.fromkeys(scorelist)) - b=sorted(scorelist)[1] + b=sorted(scorelist)[1] # Function which sorts the list in the increasing order of scores for a,c in sorted(marksheet): if c==b: diff --git a/Python/sum_of_integers_function.py b/Python/sum_of_integers_function.py index e1a73c4..aa63fed 100644 --- a/Python/sum_of_integers_function.py +++ b/Python/sum_of_integers_function.py @@ -2,7 +2,7 @@ def sum_of_int(a,b): return a+b -num1 = int(input()) -num2 = int(input()) -res = sum_of_int(num1,num2) +num1 = int(input("Enter the first number:")) +num2 = int(input("Enter the second number:")) +res = sum_of_int(num1,num2) #(Calling the function by passing the parameters num1 and num2) print(res)