Python codes

Python Boolean

Submitted by moazkhan on

In this tutorial you will learn:

  • Boolean in Python
  • Boolean expressions
  • Importance of Boolean in programming.

Boolean in Python

Boolean is perhaps one of the most simple yet the most powerful data type not only in Python but in other programming languages as well. Boolean data type has either a value of True or a value of False. Even the keywords used in Python to define Booleans are True and False.

Python Strings

Submitted by moazkhan on

In this tutorial you will learn:

  • Strings in Python
  • Immutable and Mutable in Python
  • Joining two Strings
  • String Slicing
  • Finding length of a String

Strings in Python

In the previous tutorial we learned what variables are and how Python deals with variables. In this tutorial we will start by learning the details and usage of String type variable in Python.

Introduction to Python

Submitted by moazkhan on

Introduction to Python

A powerful interpreted programming language that can do simple and complex tasks. Due to its simplicity and ability to perform mathematical calculations at a high pace. It’s being used in a number of industries from Computer Vision, Data Science, Mathematics and Machine Learning. As python is an interpreted language so it’s easy to debug and hence helps developers in doing rapid application development very quickly.

Adventure game in Python (Droid Adventure) - Text Based

Submitted by pdan250 on

Okay, i just finished programing a new droid adventure game. I got source codes from internet, pasted them on python, personalized everything, made a few changes in story, and VOILA! Here it is! Droids adventure game! Just copy the source code to your python shell, then run the module. Hope you have fun!

Sudoku Game using python 3.3.4

Submitted by engrmarcel on
#‎using‬ python 3.3.4 to develop sudoku game ‪#‎sudoku‬ game from random import randint ‪#‎generate‬ board def build_board(): board=[] for i in range(9): block=[[" "," "," "], [" "," "," "], [" "," "," "]] board.append(block) return board ## ## Ensure no other block in the same row has the value ## def row_available(block, row, board, num): # Determine which of the main 3 rows this 3x3 block is at