Posts

Showing posts from April, 2021

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.  

Use of functions in python

Image
 Welcome everyone, Today we are going to learn how to use some functions in python The most common functions are (len ,split) and many more. So Today we will learn the use of these functions 1.len() len is basically used to find out the total number of letters,numbers  in the sentence. FOR EXAMPLE: 2.split() split is basically a function which is used to break a sentence into words in a proper manner. each word in this is separated by commas and apostrophe. FOR EXAMPLE: 3.input() input function is basically used to take the response of the user, like: Name ,Number and many more information . INPUT: OUTPUT: 4.int() int function is a type of function which any number into integer number (integer number can be positive ,negative and whole number not a fraction or decimal number). FOR EXAMPLE: 5.sorted() sorted is basically used to arrange any unordered list in ordered list ( alphabetically or number sequence). 6.range() range is a most useful function in python , it is used to kn...

INTRODUCTION

Image
Hello Python learners ,welcome to kickpython As you all know that this is the time of  AI(artificial intelligence) In AI the main part is Algorithm(structure of working of  project),the algorithm defines how your code is going to work. If you are interested in Algorithm ,you are at good place. This is a  platform where you gets  to develop skills by working on various python projects. In this platform you will get daily updates of various projects. This platform also teaches us to develop algorithm skills.