Posts

How To Make Encryption and Decryption Machine

Image
  ENCRYPTION AND DECRYPTION  The program will convert the normal english into code ,which can be to normal english later on .Only those people will decrypt the message who knows the secret key. this is also known as CAESAR CIPHER. WORKING Suppose my message is "I am iron man " if i wants to decrypts the message having key value 4 then the encrypted message will be "M eq mvsr qer" .If the receiver wants to decrypts the with same key value of 4  then  the message will be "I am iron     man". To decrypt the message reader needs to know key value (This makes security of the message). If the reader has different  key value message will be different. Keyvalue is basically a difference between encrypted and decrypted word. For example: message = "I am iron man"  keyvalue =4        decrypted message= " M eq mvsr qer"                                 ...

How To Make Tic-Tac-Toe Game With Python

Image
                                                                                                                                 TIC-TAC-TOE! Tic-Tac-Toe is very interesting game played between two people. One player is x and another player is 0. If the player gets three of their marks on the board in a row, column or a diagonal ,they win and when board fills game ends in a draw.                                                      AI(artificial intelligence)  This game also includes AI for the computer to play AI instructs the co...

How To Build Dragon Realm Game With Python.

Image
 DRAGON REALM GAME This is a very interesting game ,This involves the use of function and while loop and if ,else loops. This is very simple to built to built any game we only need know that how it works. For example in this game(dragon realm) we have two cave and we have to choose one out of two, But the interesting thing is that two cave have different dragons ,Both dragons have different behavior one is friendly and second is hungry. We have to choose one out of two cave, we also don't know the position of dragons. It is looking very interesting to play this game. So lets open the python interpreter and the code given below. This is the code of the game dragon realm. This code looks very simple it does not have any AI code. It has very simple structure, The new thing is this that we have imported  new python module called time, the use of this module is to stop the next line of for some time  For example: time.sleep(5) ,this will stop the next code for 5 seconds.

How To Make Joke Telling Game With Python

Image
  JOKE  TELLING  GAME  Joke telling game is a very basic type of game .It is very interesting to play , It is very simple to make , In this game we only need to use print(), input() functions.  The above image has the source code of the joke telling game. This program has the following output.

How To Make Area Of Triangle Calculating Program With Python

Image
  CALCULATE THE AREA OF TRIANGLE  To calculate the area of triangle the only thing we need to know is formula that is (base*height/2) The above picture is the source code to make area calculating program. It is a very simple program uses int(), input function. For example: To clearly understand the use of int(), input() function see  the above  article

How To Build Future Calendar With Python

Image
  FUTURE CALENDAR Future Calendar is basically a simple calendar that has 12 months, But this future calendar tells us the date ,day of upcoming year like (2045) FOR EXAMPLE: The above example shows that how a future calendar works . The only thing we have to do is to enter the year and enter the month . The above picture has the source code of the future calendar. In line 1, we have imported the calendar module . In line 2, we have used input function to enter the year , input function lets the user to input the year of the calendar. In the same line we have used int() function that lets the user to enter only interger value. In line 4, we have used print() function to  print the given calendar according to given year and month.

How To Build Number Guessing Game With Python.

Image
  NUMBER GUESSING GAME Number guessing game is a starting of a AI. In this game computer guesses a number between  (1, 20) then we have to predict the correct number within a range of (6). In line 15, we have range of 6 ,This means that we have to guess the correct number within 6 chances (not more than 6 chances). We can increase or decrease the chances any number of time. In line 11, random.randint (1, 20)  is basically gives the range of number a computer can choose. We can change the number(1, 20) to  (1, 356) or (3, 999) to increase the interest in the game.  If you run the above program , you will see the following output.  Whenever i play this game most of the time i lose   in this game. If you are winning you seems to be champion.