Posts

Showing posts with the label Python

PvP Chain reaction game using Python

Image
At last, I've taken time and ventured a little deeper into the Python language! I used the  Tkinter   package to develop a rip-off of an android game called chain-reaction . It's a simple multiplayer board game in which the first person to occupy all the blocks on the board or of the opponent(s) wins. Try downloading and playing the game with your friends, it's FUN! Here's a video of the game I've developed(I've set the number of players to 4 and board dimensions are 6*8): Coming to the coding, I actually enjoyed the process of writing code much more in Python compared to any other previous languages that I've used. Maybe it is due to the fact that it's the first high-level language that I got my hands on. I'd never worked with Tkinter package before. It was quite easy to understand and I was able to build the game in roughly in four hours. I think that just a little effort is enough for anyone to understand how to use the  tkinter  packa...

'Hello, World!' program in 7 different languages

Image
Generally 'Hello World!' program is the first ever program that you'd do in any language. It is a rite of passage into more complex programs in any language. So here's a quick look at how to write 'Hello, World!' program in 5 major languages which are: Java C C++ C# Python SQL Ruby   Java: public class HelloWorld { public static void main ( String [ ] args ) { // Prints "Hello, World" to the terminal window. System . out . println ( "Hello, World!" ) ; } } C: # include " stdio.h " int main ( void ) { printf ( " Hello, World! " ) ; return 0 ; } C++: # include " iostream " using namespace std ; int main ( ) { cout < < " Hello, World! " ; return 0 ; } C#: public class Hello { public static void Main ( ) { System . Console . WriteLine ( " Hello, World! " ) ; } } ...