This is to certify that Samyak Kar, a Student of CLASS IX of
TECHNO INDIA GROUP PUBLIC SCHOOL, Konnagar, Hooghly , West Bengal successfully completed his project of Artificial Intelligence as prescribed by our AI teacher during Academic Year 2020-2021 As per the guidelines issued by CENTRAL BOARD OF SECONDARY EDUCATION — CBSE.
Internal Examiner External Examiner
ACKNOWLEDGEMENT In the accomplishment of this project successfully many people have bestowed upon me their blessings and the heart pledged support, this time I am utilizing to thank all the people who have been concerned with this project. Primarily I would thank god for being able to complete this project with success. Then I would like to thank my principal, Mr. Sujit Kumar Jana and my AI teacher, Barsha ma’am whose valuable guidance has been the ones that helped me patch this project and make it full proof success. His suggestion and his instruction have served as the major contributor towards the completion of the project. Then I would like to thank my parents and friends who have helped me with their valuable suggestion and guidance has been very helpful in various phases of the completion of the project. INDEX Sl. no. 1. Code for a game in scratch 2. Bibliography Code Steps Part I: Make the character jump. Step 1: Pick a character. Step 2: Choose a backdrop. Step 3: Use block “Change y by 20” to make your character jump. Step 4: Use block “Repeat by 10 times” Step 5: Use block “Change y by -20” Step 6: Use another “Repeat by 10 times” block. Step 7: Add “When space key is pressed” block on top to make the character jump when space key is pressed. Part II: Make obstacles to jump over. Step 1: Pick an obstacle Step 2: Size down the obstacle so the character can jump over it. Step 3: Use “Go to x:235 and y:-47” to set the obstacle at the right of the screen. Step 4: Use “Glide 2 secs to x:-235 and y:-47” to make the obstacle move towards the character. Step 5: Put this in a “Forever loop” so that the obstacles keep on coming. Step 6: Put it under a “When clicked” so that the actions take place after is clicked. Part III: Stopping the game. Step 1: Use a “Stop all” block to stop the whole game. Step 2: Use a “Wait until block” with a “touching character” block so that the game stops when the obstacle touches the character. Step 3: Put it under a “When clicked” so that the actions take place after is clicked. Step 4: Use a “Go to x:-185 y:-33” with a “When clicked” so that the obstacle moves to the original position when is clicked. Part III: Adding more obstacles. Step 1: Duplicate the obstacle by right clicking on it. Step 2: Use a “Wait 1 sec” block to make the 2nd obstacle wait a second before moving. Step 3: Use a “Hide” block to make the object hide while it waits. Step 4: Use a “Show” block to make the object show itself once it is done waiting. Part IV: Keeping score Step 1: Make a variable named “Score” Step 2: Use a “Change score by 1” with the character's code to keep score. Step 3: Use a “Set score to 0” whenever the player loses. Output: Bibliography • Google • Study material • YouTube • Scratch Website