Skip to content

Commit de0833c

Browse files
2 parents 39cbfa1 + d896909 commit de0833c

File tree

7 files changed

+8
-11
lines changed

7 files changed

+8
-11
lines changed

Collections/Word Order.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
inp = input()
44
dic[inp] = dic.get(inp,0)+1
55

6-
#print(dic)
76
print(len(dic))
87

98
for k,v in dic.items():

Sets/Introduction to Sets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ def average(array):
33
length = len(se)
44
return(sum(se)/length)
55

6+
67
if __name__ == '__main__':
78
n = int(input())
89
arr = list(map(int, input().split()))
910
result = average(arr)
10-
print(result)
11+
print(result)

String's/Find a string.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ def count_substring(string, sub_string):
77
if le+i == len(string):
88
break
99
return(c)
10-
1110
if __name__ == '__main__':
1211
string = input().strip()
1312
sub_string = input().strip()
1413

1514
count = count_substring(string, sub_string)
16-
print(count)
15+
print(count)

String's/Mutations.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ def mutate_string(string, position, character):
33
st[position] = character
44
return("".join(st))
55

6-
76
if __name__ == '__main__':
87
s = input()
98
i, c = input().split()
109
s_new = mutate_string(s, int(i), c)
11-
print(s_new)
10+
print(s_new)

String's/String Split and Join.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
def split_and_join(line):
22
line = line.split()
33
return("-".join(line))
4-
54
if __name__ == '__main__':
65
line = input()
76
result = split_and_join(line)
8-
print(result)
7+
print(result)

String's/What's Your Name.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ def print_full_name(a, b):
33
print(a,end=" ")
44
print(b,end="")
55
print("! You just delved into python.")
6+
67
if __name__ == '__main__':
78
first_name = input()
89
last_name = input()
9-
print_full_name(first_name, last_name)
10+
print_full_name(first_name, last_name)

String's/sWAP cASE.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
def swap_case(s):
22
return(s.swapcase())
3-
43
if __name__ == '__main__':
54
s = input()
65
result = swap_case(s)
7-
print(result)
6+
print(result)

0 commit comments

Comments
 (0)