Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pi with 3.14 #222

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test
  • Loading branch information
Ra00f1 committed Jul 22, 2023
commit db29637e0f12972884bcf8712ab8a47d55398506
8 changes: 1 addition & 7 deletions recursion/replacePi.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
def desending(s):
if(len(s) == 1):
return s
res = desending(s[1:])
if(s[0]=='p' and s[1]=='i'):
return '3.14'+res[1:]
else:
return s[0]+res
return s.replace("pi", "3.14")


s = input()
Expand Down