Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6b44542

Browse files
committed
finish one 6 kyu
1 parent 97a529f commit 6b44542

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

β€Ž[6 kyu]Almost Even.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def splitInteger(num,parts):
2+
mul,mod = divmod(num,parts)
3+
return [mul] * parts
4+
5+
print(splitInteger(23,2))
6+
7+
8+
#We need the ability to divide an unknown integer
9+
#into a given number of even parts β€” or at least as even as they can be.
10+
#The sum of the parts should be the original value,
11+
# but each part should be an integer,
12+
#and they should be as close as possible.

β€Ž[6 kyu]Evil Autocorrect Prank.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import re
2+
def autocorrect(input):
3+
return re.sub(r'\bu\b|\b[Yy]ou\b|\byou+\b','your sister',input)
4+
5+
print(autocorrect('You'))
6+
7+
#test.assert_equals(autocorrect("u"),"your sister")
8+
#test.assert_equals(autocorrect("you"),"your sister")
9+
#test.assert_equals(autocorrect("Youuuuu"),"your sister")

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /