Skip to content

Instantly share code, notes, and snippets.

@Nishan8583
Created September 29, 2019 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nishan8583/8bcf10398d9963b0ce08097eaed04fe1 to your computer and use it in GitHub Desktop.
Save Nishan8583/8bcf10398d9963b0ce08097eaed04fe1 to your computer and use it in GitHub Desktop.
import time
str2 = "*"
str3 = "&"
str4 = "@"
str5 = "#"
str6 = "+"
str7 = "$"
str8 = "_"
str9 = ""
stat2 = 0
l = ["a","b","c","d","e","f","g","h","i","j","k",
"l","m","n","o","p","q","r","s","t",
"u","v","w ","x","y","z"]
def RtoN(s,i):
result = ""
for k in s:
charat = ord(k) + i
if charat > 122 :
charat = charat - (i * 2)
result = result + chr(charat)
return result
def crack(stat,stat2,stat3):
_str = "*"
str2 = "$"
rep = "flare" * (stat/stat3)
rep2 = RtoN("bear",stat*stat2) * (stat2*2)
rep3 = "yeah" * stat3
result = rep+_str+rep2+str2+rep3
return result
mass = 0
happy = 0
clean = 0
s = ""
def feed():
global mass, happy, clean,s
s = s + "f"
mass = mass + 10 # call 8 times and call play 4 times
happy = happy + 2
clean = clean - 1
def play():
global mass, happy, clean, s
s = s + "p"
mass = mass - 2
happy = happy + 4
clean = clean - 1
s = s +""
def cleaner():
global mass, happy, clean, s
s = s + "c"
happy = happy - 1
clean = clean + 6
for i in range(0,8):
feed()
for i in range(0,4):
play()
cleaner()
cleaner()
def getState(v):
global s
c = 0
for i in s:
if v == i:
c = c + 1
return c
print("Final Values: Mass={} Happy={} Clean={} String:{} fState={} pState={} cState={}".format(mass,happy,clean,s,getState("f"),getState("p"),getState("c")))
stat = 8
stat2 = 4
stat3 = 2
print(crack(stat,stat2,stat3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment