Monday, December 12, 2011

Python Tutorials

Downlooad here http://dl.dropbox.com/u/16440802/tutorialPython.pdf

somes in python


#Kiem tra (a, b, c) co phai 3 canh cua 1 tam giac hay khong
def main():
    a= float(raw_input('Nhap vao canh a= '))
    b= float(raw_input('Nhap vao canh b= '))
    c= float(raw_input('Nhap vao canh c= '))

    if a+b>c and b+c>a and c+a>b:
        print "(%d, %d, %d) la 3 canh 1 tam giac :D" %(a, b, c)
    else:
        print "K phai 3 canh 1 tam giac."
if __name__ == '__main__':
    main()
----------------------------------------------

#Lap trinh doi chu thuong thanh chu hoa
def main():
    s= raw_input('Nhap vao 1 xau ky tu: ')
    print s.upper()
if __name__== '__main__':
    main()
----------------------------------------------

#Doi cho 2 bien gia tri kieu real
def main():
    a= float(raw_input('a= '))
    b= float(raw_input('b= '))
    a, b= b, a
    print a, b
if __name__== '__main__':
    main()


Sunday, December 4, 2011

Python Programming for Beginners by Jody S. Ginther


  • Title: Start Here: Python Programming for Beginners
  • Author: Jody S. Ginther
  • Published: eBook 2010
  • Language: English

Book Description:
Start Here: Python Programming for Beginners is a book for the total beginner who is interested in programming. It teaches the new programmer from ground zero through hands-on exercises.


Start Here: Python Programming for Beginners was written to be as simple and brief as possible to avoid unnecessary information that may confuse a beginner. It is humorous and was written to reflect the changes in Python version 3 and later. Check this site in the future for a more in-depth course on Python and game programming by Jody Ginther. 


About the Author
Jody S. Ginther is a professor who has been teaching Business, Math, Science, and IT subjects at universities in mainland China for the last 14 years. He was born in Sidney, Montana, USA. His hobbies include; working, martial arts, other arts, animation, programming, and music. He is also the president of Alien Cat Studios®.
You will need free 7 zip to unpack it.  

Sunday, October 9, 2011

How to compile C/C++ programs under Linux (Absolute basics)

You have probably heard a lot about Linux and how you can do some real good programming under Linux. But right now you cant even get the simplest of Hello World programs to compile.
Here's how you do it -using gcc compiler

Once you have written and saved your C program using any editor return to the prompt. An ls command should display your C program. It should have the .c extension. Now at the prompt type the following

$ gcc -o firstprogram firstprogram.c

If your file is named firstprogram.c then type '-o firstprogram' as the parameter to gcc. This is basically your suggested name for the executable file that gcc would create. In case you typed something like the following

$ gcc firstprogram.c

You would be having a a.out in the same directory as the source C file. This is the default name of the executable that gcc creates. This would create problems when you compile many programs in one directory. So you override this with the -o option followed by the name of the executable

$ gcc -o hello secondprogram.c

Would create an executable by the name hello for your source code named secondprogram.c

Running the executable that you created is as simple as typing the following at the prompt.


$ ./firstprogram
OR
$ ./hello

Or whatever you named your executable.

This is the absolute basics of compiling C programs under Linux. Watch out for the articles that shall explain multiple file program compilation using make and other such tools.

Wednesday, May 11, 2011

Discuzz Virtual Pascal

This is nice IF you're coming from Turbo Pascal for DOS or you need to support OS/2, but as a general development environment, it's barely comparable to the version of Delphi from 9 years ago. In other words, if you're not stuck with a bunch of ancient TP code/skills or an app which must run on OS/2, this is a poor tool for Win32/Linux programming.

VPC 's fast, generates tight code, is almost 100% Borland compatible, is more powerful, and is free...
This is a must for DOS 32 developers who want to upgrade their Turbo Pascal 7.1 or their Borland Pascal 7.01 to the latest compatible versions.

From betanew
http://fileforum.betanews.com/detail/Virtual-Pascal/969940252/1