@BernieOrVest@mastodon.social @arteteco @freemo Climate nazis spotted.

@hasanraza Can you do OOP vs FP? I still don't really understand the difference.

@Absinthe
def coctake (n,m):
for i in range (m):
n = n*1.2
n = n+1
return n
def hcoctake (n,m):
for i in range (m):
n = n*0.2
n = n+1
return n
for i in range(1000) :
j = coctake(i*5,5)
j = float(j)
if (j).is_integer() is True :
print int(j)
for m in range (5):
print int(i+hcoctake(i*5,m))
else :
continue
My approach return the original number of coconut to 7771, which is a bit absurd so I don't know if this approach is correct or not. What it does is that it tries to guess the number of the morning pile divided by 5. It then reverse engineer that number to find the possible number of coconut at the start. If the number of coconut that if found is a whole number, it will print that number and find the number of coconut the other 5 people get.

@TheGnuMaster RMS is supposedly guilty for what? I didn't catch up with thr news.

@Absinthe
Puluhan = {9 : "Ninety",8 : "Eighty",7 : "Seventy",6 : "Sixty",5 : "Fifty",4 : "Forty",3 : "Thirty",2 : "Twenty",1 : "",0 : "",}
Belasan = {9: "Nineteen", 8: "Eighteen", 7:"Seventeen",6: "Sixteen", 5: "Fifteen", 4:"Fourteen",3:"Thirteen",2:"Twelve", 1: "Eleven",0:"Ten"}
Satuan = {9 : "-Nine",8 : "-Eight",7 : "-Seven",6 : "-Six",5 : "-Five",4 : "-Four",3 : "-Three",2 : "-Two",1 : "-One",0 : "",}
SatuanS = {10:"Ten", 9 : "Nine",8 : "Eight",7 : "Seven",6 : "Six",5 : "Five",4 : "Four",3 : "Three",2 : "Two",1 : "One",0 : "",}
f = 9
n = 9
h = 9
while f > 1 :
g = 9
while g > -1 :
if g == 0 and f != 2:
o = Puluhan[f]+Satuan[g] + " bottle of beers on the wall.\n"+Puluhan[f]+ Satuan[g]+" bottles of beer. Take one down, pass it around...\n"+Puluhan[f-1]+Satuan[9]+" bottles of beer on the wall."
else :
if g > 1:
o = Puluhan [f]+Satuan[g] + " bottle of beers on the wall. \n" + Puluhan [f]+Satuan[g]+ " bottles of beer. Take one down, pass it around...\n"+Puluhan[f]+Satuan[g-1]+" bottles of beer on the wall."
elif g == 1 :
o = Puluhan [f]+Satuan[g] + " bottle of beers on the wall. \n" + Puluhan [f]+Satuan[g]+ " bottles of beer. Take one down, pass it around...\n"+Puluhan[f]+" bottles of beer on the wall."
g = g-1
print o
if f == 2 and g == 0:
break
else :
continue
f = f-1
while f > -1 :
g = 9
while g >0 and f > 0:
o = Belasan[g] + " bottle of beers on the wall.\n"+Belasan[g]+" bottles of beer. Take one down, pass it around...\n"+Belasan[g-1]+" bottles of beer on the wall."
print o
g = g -1
g = 10
while g > 0 and f < 1:
if g == 1:
o = SatuanS[g] + " bottle of beers on the wall.\n"+SatuanS[g]+" bottles of beer. Take one down, pass it around...\n""No bottles of beer."
else :
o = SatuanS[g] + " bottle of beers on the wall.\n"+SatuanS[g]+" bottles of beer. Take one down, pass it around...\n"+SatuanS[g-1]+" bottles of beer on the wall."
print o
g = g -1
f = f-1
print "Done"

A newbie with python. Having this challenge taught me how I could play with loop. Funny, how I thought to use for but then realize while is a lot more fitting.

@Absinthe @paleBlue if you use number instead of text, this would be a walk in the park.

@iankenway wanting a sovereign nation to rule over you instead of a trans-national state is now fascist, apparently.

@techmagus why the hell are you using facebook in thr first time?

@Surasanji why europe? Why not go to some rural are in a developing nation far from government and corporations?

@Absinthe doesn't it depends on what the person wanted to with it?

@iankenway any consolidation of power, be it of the corporation or of the state is bad. That's why EU is bad.

@mngrif @fructose_dealer that person probably have already fallen to the SJWs, there's no going back.

@smaragdus I don't understand the problem. The white becomes a minority, so what?

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.