Pikir dan Rasa

cogito ergo sum

Posts Tagged ‘python

Ideone.com | Online IDE & Debugging Tool >> C/C++, Java, PHP, Python, and 40+ compilers and intepreters

leave a comment »

What is ideone?
Ideone is something more than a pastebin; it’s an online compiler and debugging tool which allows
to compile and run code online in more than 40 programming languages.

How to use ideone?
Choose a programming language, enter your source code and input data into text boxes. Then check or uncheck run code (whether to execute your program) and private (whether not to list your code in the recent codes page) checkboxes, click the submit button and watch your snippet being executed.

Having problems?
Check the samples to see how to write a properly working code. To find out more, see the help section or the FAQ page.

Footer: Autoposted dengan [ email ] dari [ sunu’s posterous ]

Written by sunupradana

January 6, 2012 at 6:02 pm

Online programming, code test [codepad]

leave a comment »

codepad is an online compiler/interpreter, and a simple collaboration tool.
Paste your code below, and codepad will run it and give you a short URL you can use to share it in chat or email.

 

 

Footer: Autoposted dengan [ email ] dari [ sunu’s posterous ]

Written by sunupradana

January 6, 2012 at 5:29 pm

Skulpt

leave a comment »

Skulpt

Python. Client side.

Skulpt is an entirely in-browser implementation of Python.

No preprocessing, plugins, or server-side support required, just write Python and reload.

 

Footer: Autoposted dengan [ email ] dari [ sunu’s posterous ]

Written by sunupradana

January 6, 2012 at 5:06 pm

Online Python Tutor: Learn and practice Python programming in your web browser

leave a comment »

Learn Python by writing code and visualizing execution

This free educational application allows teachers and students to write Python scripts directly in the web browser, execute those scripts, single-step forwards and backwards through execution, and view the run-time state of all data structures.

Rather than displaying a bland text-based console, the Online Python Tutor provides a rich visualization of variables, heap objects, and stack frames. For example, the following code:

x = ["Alice", "Bob", "Charlie"] y = x z = ["Alice", "Bob", "Charlie"]

will be visualized as the following HTML diagram, which properly shows aliasing relationships:

Go play with the Online Python Tutor!

 

Footer: Autoposted dengan [ email ] dari [ sunu’s posterous ]

Written by sunupradana

January 6, 2012 at 4:59 pm

Contoh sederhana fungsi print() pada Python 3

leave a comment »

Berikut adalah contoh baris kode sederhana yang mempergunakan fungsi print() pada Python 3.


#!/usr/bin/env python
a = 10
b = 12.235123
c = 54.1315159685268134
d = 4
e = 5
f = b/c

print("")
print("Nilai a = ", a)
print("Nilai b = ", b)
print("Nilai c = ", c)
print("")
print("Nilai 4/5= ", d/e)
print("")
print("Nilai b/c= ", b/c)
print("Nilai b/c= %f" % (b/c))
print("Nilai b/c= %d" % (b/c))
print("Nilai b/c= %s" % (b/c))
print("")
print("Nilai b/c dengan format %d","= %d" % (b/c), " ,terlihat bedanya dengan f =", f)
print("")

Hasilnya sebagai berikut:

sunu@sunu-HP-Mini-110-1000:~/pythonlat$ python3 printpython3.py

Nilai a = 10
Nilai b = 12.235123
Nilai c = 54.1315159685

Nilai 4/5= 0.8

Nilai b/c= 0.226025870162
Nilai b/c= 0.226026
Nilai b/c= 0
Nilai b/c= 0.22602587016

Nilai b/c dengan format %d = 0  ,terlihat bedanya dengan f = 0.226025870162

 

Written by sunupradana

September 13, 2011 at 11:47 am

Posted in Komputer

Tagged with ,

The Zen of Python [by Chris Miller]

leave a comment »

 

 

    Beautiful is better than ugly.

    Explicit is better than implicit.

    Simple is better than complex.

    Complex is better than complicated.

    Flat is better than nested.

    Sparse is better than dense.

    Readability counts.

    Special cases aren’t special enough to break the rules.

    Although practicality beats purity.

    Errors should never pass silently.

    Unless explicitly silenced.

    In the face of ambiguity, refuse the temptation to guess.

    There should be one– and preferably only one –obvious way to do it.

    Although that way may not be obvious at first unless you’re Dutch.

    Now is better than never.

    Although never is often better than *right* now.

    If the implementation is hard to explain, it’s a bad idea.

    If the implementation is easy to explain, it may be a good idea.

    Namespaces are one honking great idea — let’s do more of those!

 

 

Podcast, part 1 [click to play]

Podcast, part 2 [click to play]

 

From Python Import Podcast web site

 

Written by sunupradana

September 9, 2011 at 1:46 pm

Posted in Komputer

Tagged with , ,

A Gentle Introduction to Programming Using Python | MIT OCW

leave a comment »

 

Course Description

This course will provide a gentle, yet intense, introduction to programming using Python for highly motivated students with little or no prior experience in programming. The course will focus on planning and organizing programs, as well as the grammar of the Python programming language.

The course is designed to help prepare students for 6.01 Introduction to EECS. 6.01 assumes some knowledge of Python upon entering; the course material for 6.189 has been specially designed to make sure that concepts important to 6.01 are covered.

This course is offered during the Independent Activities Period (IAP), which is a special 4-week term at MIT that runs from the first week of January until the end of the month.

January IAP 2011

 

 

Untuk download keseluruhan materi kursus, silahkan klik di sini.

Please click here to download course materials in one zip file.

Written by sunupradana

September 8, 2011 at 10:12 am

Posted in Komputer

Tagged with , , ,