Link to Mod Share Mod Share

  Users Browse Upload Forums Log in

Mod Share Forums

Welcome to the Mod Share forums.

You are not logged in.

#1 2012-12-26 16:38:14

Molybdenum
Mod Share-er
From: IDK
Registered: 2012-11-24
Posts: 256

Python

Really easy and fun smile
codepad.org for an online interpreter.

Here's an ackermann function:

def ack(m,n):
 if m==3:
  return 2**(n+3)-3
 else:
  if n==0:
   return ack(m-1,1)
  else:
   return ack(m-1,ack(m,n-1))
print ack(4,2)

Last edited by Molybdenum (2012-12-26 16:38:21)


Please help! Free ads on my next project on Scratch for helpers! Love-its on your 5 most recent projects (also with ads) for people who fix the entire problem!
ALL THESE WORLDS ARE YOURS - EXCEPT EUROPA - ATTEMPT NO LANDING THERE / I've quit MS. Why? ":P". Feel free to land on Europa now, and you might contact me at intf.tk or intforums.com, but remember the 49 minute time lag between Europa and Earth.
x8HDw.gif
SHA-256 confirmation

Offline

#2 2012-12-26 16:39:17

jvvg
Mod Share Team
From: United States
Registered: 2012-09-16
Posts: 616
Website

Re: Python

I've played with Python before. It's very difficult for me to learn when I'm used to C syntax. I'm used to indentation not mattering. However, a few of my friends are learning to program, so I told them to try it, and they like it.


wr5t1.png2h6dij7.png293kn7c.jpg2lwke37.png
Programmer • Runner • Mod Share Admin

Offline

#3 2012-12-26 17:27:27

Molybdenum
Mod Share-er
From: IDK
Registered: 2012-11-24
Posts: 256

Re: Python

jvvg wrote:

I've played with Python before. It's very difficult for me to learn when I'm used to C syntax. I'm used to indentation not mattering. However, a few of my friends are learning to program, so I told them to try it, and they like it.

I'm not really used to anything; most of my programs are in vb, which autoindents and does a bunch of stuff for you anyway. I just find python simple to start with: Instead of having to include stdio.h, putting everything in a main sub, and returning 0, you can just start typing. Also, theres not that many exceptions and rules are simple: Colon for indented blocks, no need to end any blocks with special statements, stuff like that.


Please help! Free ads on my next project on Scratch for helpers! Love-its on your 5 most recent projects (also with ads) for people who fix the entire problem!
ALL THESE WORLDS ARE YOURS - EXCEPT EUROPA - ATTEMPT NO LANDING THERE / I've quit MS. Why? ":P". Feel free to land on Europa now, and you might contact me at intf.tk or intforums.com, but remember the 49 minute time lag between Europa and Earth.
x8HDw.gif
SHA-256 confirmation

Offline

#4 2019-11-24 13:41:00

-FasterThanLight-
New Mod Share-er
Registered: 2019-11-20
Posts: 3

Re: Python

I like coding Python. So much so that I've tried to get my brother, sister, and even mother to learn it. (none of those lessons got anywhere) smile

Offline

Board footer

This is part of Mod Share v4.0