SlideShare a Scribd company logo
1 of 42
Chapter # 5
Advance Programming
Teacher: Ahmad Zarif Contact # 0343-924-9404
Fazaia Inter College & School KOHAT
Points for Copy Work
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 2
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 3
Date H/W Chapter # MCQS Date H/W Chapter #
Descriptive
Types Question Date H/W Chapter #
Application
based Questions
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 4
Date H/W Chapter # SLO MCQS Date H/W Chapter # Lab Questions Date H/W Chapter # Group Project
Agenda
1) MCQS
2) Descriptive Type Question’s
3) Application Based Question
4) Lab Based Question
5) Group Questions
6) SLO Based MCQ’s
7) SLO Based Question’s
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 5
Choose the Correct Option.
a. A person that writes codes in different programming languages is known as ________?
b. Which one of the following is not programming language?
c. Which version of python did you learn in this chapter?
d. Which of the following is an assignment operator?
e. Which of the following is a loop in Python3?
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 6
i. A Programmer ii. A Technician iii. A Writer iv. A Polygot
i. C++ ii. Java Script iii. Python iv. B++
i. Python1 ii. Python2 iii. Python3 iv. Python4
i. + ii. - iii. % iv. =
i. For Loop ii. While Loop iii. None of These iv. All of these
Descriptive Type Question
a. Define programming language. What are the most commonly used programming languages?
Answer: A programming language is the computer language or it is set of instructions, used by
programmer and developers to write and develop different programs and software, a programming
languages uses words form the English language, every programming language has its syntax, rules and
structure, Common example of programming languages are:
C Language: C languages is considered as the base for other programming languages, that is why
it is known as mother language.
C++ Language: C++ is an object-oriented programming language which gives a clear structure to
programs.
Java: Java is a high level, robust, object-oriented and secure programming language.
Python: Python is a high-level, interpreted, interactive and object-oriented scripting language.
Python is designed to be highly readable.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 7
b. Differentiate between the types of programming languages.
1) Assembly Language:
Define: Assembly language program is consisting of mnemonics that is translated into machine
code. A program that is used for this conversion is known as assembler.
Features:
1) It is a low-level programming language.
2) It allows programmers to use human readable code.
3) It allows complex jobs to run in a simpler way.
4) It helps in contacting the hardware directly.
Application:
It is used for coding device drivers, real time system, low level embedded systems, boot codes etc.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 8
Descriptive Type Question
b. Differentiate between the types of programming languages.
2) C++
Define: C++ is an object-oriented programming language which gives a clear structure to
programs.
Features:
1) It is a mid level programming language.
2) It provides a structure approach of breaking a problem into separate part.
3) It is a portable language which means that it can be used on any platform.
4) It has a rich library and has a lot of built in functions.
Application:
It is used in operating system, web browsers, games, banking applications, software engineering, data
structure
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 9
Descriptive Type Question
b. Differentiate between the types of programming languages.
3) Java
Define: Java is a general-purpose, class-based, object-oriented programming language
Features:
1) It is considered as one of the easiest programming languages.
2) It is a portable languages which means that it can be used on any platform.
3) It is more secure than other programming languages.
4) It is capable of handling run time errors.
Application:
It is used in mobile applications, desktop graphics, user interface (GUI), web based gaming and cloud based
application.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 10
Descriptive Type Question
c. How do you install python on your computer?
There are following steps for install python:
1) Go to google.com and search “Python download”
2) Click on the link.
3) Select your platform and click “Download Python 3.10.5”.
4) Choose the download location and wait for the file to download.
5) Click the downloaded file.
6) Select “Add python 3.10 to Path”.
7) Then click “Install Now”.
8) Wait for the installation to finish and then click “Close”.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 11
Descriptive Type Question
d. How do you create and run a python program?
There are following steps are included:
1) To start coding , create a new project.
2) Rename the project.
3) Click Create.
4) Erase everything in “main.py”.
5) start coding.
6) To run the code ,right click and select “Run main” or you can press Ctrl+Shift+F10.
7) To run python code, you must first download and install python.
8) Go to Google.com and search “Python download”.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 12
Descriptive Type Question
e. How do you use blocks to create a script in Scratch?
To use this block, just follow the following steps:
1. Click on the “My Blocks” button.
2. Click on “Make a Block”.
3. To add a number or text to your customized block,
4. Click on the first option of the three available options present at the extreme left.
5. To add a Boolean value to your customized block,
6. Click on the second option of the three available options present in the middle
To add a label to your customized block,
7. Click on the third option of the three available options present at the extreme right. after creating
the block and giving it a name, click on “OK” to move forward.
8. Once you click on “OK”, the new block will appear in the block palette
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 13
Descriptive Type Question
f. Can you give some examples of different types of blocks that are available in Scratch?
In Scratch we use following types of blocks,
1) Motion Block: Motion block is a type of block in the block palette. This type of block is used to c
control the sprite's movement.
2) Looks Block: The script blocks under the looks category control the visual appearance of your sprite.
these functions allow you to change your sprite's costume.
3) Control Block: The function of the control blocks is to control the movement of the sprite under
certain conditions.
4) Events Block: Events blocks are blocks of code that are triggered by events. An event is something
that happens in the program, such as a sprite being clicked on or a key being pressed.
5) Sensing Block: Sensing blocks are used to identify and measure how objects within a project
are interacting with each other or to detect certain keyboard and mouse
movement.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 14
Descriptive Type Question
1. Write the script in python to enter the marks of English, mathematics, and science and find the
total and the percentage.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 15
Application Based Question
English = 40
Mathematics = 55
Science = 53
total= English+Mathematics+Science
percentage = (total/300)*100
print(total)
print(percentage)
2. What are some common techniques for designing and implementing game mechanics in Scratch?
Here are some common techniques and tips for designing and implementing game mechanics in Scratch:
a) Character Movement:
• Use the "Move" blocks to control the movement of characters or objects in your game.
• Utilize arrow keys or other input controls to move characters smoothly.
b) Collision Detection:
• Use "If on edge, bounce" and "touching [sprite]" blocks to detect collisions between sprites.
c) Level Design:
• Design and build levels with different layouts and challenges.
• Implement win conditions to advance to the next level.
d) Testing and Iteration
• Playtest your game frequently to identify and fix issues with game mechanics.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 16
Application Based Question
3. How do you use variables, conditions and loops to create more complex and interactive games in
scratch?
We use variable, conditions and loops to create more complex and interactive games in scratch by
following ways:
Add a variable in Scratch
Click on Variables in the Code tab, then click on Make a Variable. Type in the name of your
variable. You can choose whether you would like your variable to be available to all sprites, or to
only this sprite.
Add a Condition in Scratch
Drag and drop an "if" block From the "Control" category in the Scratch blocks palette, you can
find the "if" block. Drag this block to your project's scripting area.
Add a loops in Scratch
Drag a "Forever" block from the "Control" category in the blocks palette.Place the blocks you
want to repeat indefinitely inside the "Forever" block.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 17
Application Based Question
1. Create a variable and assign a value to it. Then add 500 using the assignment operator.
# Create a variable and assign a value to it
my_variable = 100
# Use the assignment operator to add 500 to the variable
my_variable += 500
# Print the updated value of the variable
print(my_variable)
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 18
Lab Based Question
2. Print the table of two using the assignment operators.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 19
Lab Based Question
# Multiplication table (from 1 to 10) in Python
num = 2
# Iterate 10 times from i = 1 to 10
for i in range(1, 11):
print(num, ‘x’ , i , ‘=‘ , num * i)
3. Enter the marks of three students , and find out who scored the highest using the
comparison
operator.
Ahmad =40;
Ali =34;
Haleem =43;
if Ahmad > Ali and Ahmad > Haleem:
largest = Ahmad;
elif Ali > Ahmad and Ali > Haleem:
largest = Ali;
else:
largest = Haleem;
print(largest)
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 20
Lab Based Question
Code a simple calculator, take two numbers as user inputs. Give user conversion options
to perform different mathematical operations on these numbers and print the out put.
21
Group Project
n1 = float(input("Enter the first number"))
n2 = float(input("Enter the second number"))
op = input("What's the programming language you want to learn? ")
match op:
case "+":
r = n1 + n2;
print(r)
case "-":
r1 = n1 - n2;
print(r1)
case "*":
r2 = n1 * n2;
print(r2)
case "/":
r3 = n1 / n2;
print(r3)
case _:
print("You Enter invalid operator")
SLO MCQ’s
1. Drag and drop blocks is related to ________?
2. b. Text based programming languages in which programmers____________?
3. ______________ is example of a visual program.
4. ______________ is example of a textual program.
5. ____________ helps in contacting the hardware directly.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 22
i. A Programmer ii. Visual based iii. Textual iv. A Polygot
i. Drag ii. Drop iii. Write Code iv. B++
i. Python1 ii. Python2 iii. Scratch iv. Textual
i. C ii. C++ iii. Python iv. All of these
i. C++ ii. Python iii. Assembly iv. All of these
SLO MCQ’s
6. ________________ was the first programming language?
7. b. A programming language uses words from the _______ language?
8. Python 2 and Python 3 both the versions are ____________ from each other.
9. Python is an ___________ language.
10. Python is developed by_____________.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 23
i. C++ ii. A iii. FORTRAN iv. B Language
i. High ii. English iii. Urdu iv. None
i. Same ii. Different iii. Simple iv. Hard
i. Compiler ii. Hard iii. Python iv. Interpreter
i. Guido ii. Alex iii. Tonny iv. All of these
SLO MCQ’s
11. ____________ operator is used to join a string and number?
12. Python does not have a command for declaring ___________.
13. “int” just assign a ___________ value.
14. “Float” just assign a____________value.
15. _____________ is simply a collection of characters or letters.
Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 24
i. ++ ii. + iii. “+” iv. “++”
i. Text ii. Constant iii. Variable iv. None
i. Float ii. Numeric iii. Text iv. Binary
i. Text ii. Address iii. String iv. All of these
i. Float ii. Numeric iii. Text iv. Binary
16. When the comparison statement is correct the output will be _________
i. ++ ii. + iii. True iv. False
1) Differentiate between visual and textual programming.
Visual-based programming languages are ones that allow you to manipulate visual elements — e.g. drag and drop
blocks — to make a program, as opposed to text-based programming languages, which have you write lines and lines of
code to make a program.
2) Define Computer Program.
Computer Program is a sequence of instructions written in a proper language through which the computer can
understand and solve the problem given to it. It is the method by which the whole computing process is directed and
controlled.
3) What is programming language?
A programming language is a set of instructions written by a programmer to deliver instructions to the computer to
perform and accomplish a task.
4) Describe python.
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
It is used for:
• web development (server-side),
• software development,
• mathematics,
• system scripting.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 25
SLO Based Questions
5) Write down the features of python.
6) Write the step for writing your python program.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 26
SLO Based Questions
5) Write the step for writing your python program.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 27
SLO Based Questions
6) Write the Algorithm to in which its IDE take two inputs and convert into integer and run the loop 10 time.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 28
SLO Based Questions
7) Write the Flowchart to in which its IDE take two inputs and convert into integer and run the loop 10 time.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 29
SLO Based Questions
8) Write the Python Code in which its IDE take two inputs and convert into integer and run the loop 10 time.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 30
SLO Based Questions
9) Briefly describe python syntax.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 31
SLO Based Questions
10) Write about datatypes mostly use in Python.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 32
SLO Based Questions
11) Explain different types of operator.
a) Arithmetic Operator:
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 33
SLO Based Questions
11) Explain different types of operator.
a) Assignment Operator
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 34
SLO Based Questions
11) Explain different types of operator.
a) Comparison Operator
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 35
SLO Based Questions
12) Write the Python Code for All Arithmetic Operators.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 36
SLO Based Questions
13) Write the Python Code for Assignment Operator.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 37
SLO Based Questions
13) Write the Python Code for Compression Operator.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 38
SLO Based Questions
14) Write down the steps for Scratch new project.
a) Add your sprite
b) Add a backdrop
15) Write down the step for wizard movement.
a) If/then movement
b) Loop it
c) Two directions
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 39
SLO Based Questions
16) Write down the program in scratch for the fire ball. Book page:104
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 40
SLO Based Questions
17) Write down the step for create variable for player health.
18) Write down the program for player health.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 41
SLO Based Questions
19) Write down the program for Enemy health.
Friday, April 5, 2024
Teacher : Ahmad Zarif Contact # 0343-924-9404 42
SLO Based Questions

More Related Content

Similar to Class 8th Book key board Chapter 5 Excersie.pptx

INF 103 Effective Communication/tutorialrank.com
 INF 103 Effective Communication/tutorialrank.com INF 103 Effective Communication/tutorialrank.com
INF 103 Effective Communication/tutorialrank.comjonhson291
 
ONLINE ACCESSThank you for purchasing a new copy of In.docx
ONLINE ACCESSThank you for purchasing a new copy of In.docxONLINE ACCESSThank you for purchasing a new copy of In.docx
ONLINE ACCESSThank you for purchasing a new copy of In.docxcherishwinsland
 
Whay QA- engineers should know how to code
Whay QA- engineers should know how to codeWhay QA- engineers should know how to code
Whay QA- engineers should know how to codeQA Club Kiev
 
Nepali character classification
Nepali character classificationNepali character classification
Nepali character classificationPitambar88
 
Subtle Encipherment Hall
Subtle Encipherment HallSubtle Encipherment Hall
Subtle Encipherment HallVenkateshwarGS
 
4.Security Assessment And Testing
4.Security Assessment And Testing4.Security Assessment And Testing
4.Security Assessment And Testingphanleson
 
BoscoChat (A free Wi-Fi Chat Room in Android)
BoscoChat (A free Wi-Fi Chat Room in Android)BoscoChat (A free Wi-Fi Chat Room in Android)
BoscoChat (A free Wi-Fi Chat Room in Android)Samaresh Debbarma
 
Bahan ajar bahasa inggris (procedure text)
Bahan ajar bahasa inggris (procedure text)Bahan ajar bahasa inggris (procedure text)
Bahan ajar bahasa inggris (procedure text)Dikha Wijanarko
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startMaxim Salnikov
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questionsadarshynl
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworksYuri Visser
 
InFS6830 Secure Programming Questions Page 7 of 7Essay.docx
InFS6830 Secure Programming Questions Page 7 of 7Essay.docxInFS6830 Secure Programming Questions Page 7 of 7Essay.docx
InFS6830 Secure Programming Questions Page 7 of 7Essay.docxjaggernaoma
 
Algorithms and Application Programming
Algorithms and Application ProgrammingAlgorithms and Application Programming
Algorithms and Application Programmingahaleemsl
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTao Xie
 
How to become a software developer
How to become a software developerHow to become a software developer
How to become a software developerEyob Lube
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentTomCooley
 
C and CPP Interview Questions
C and CPP Interview QuestionsC and CPP Interview Questions
C and CPP Interview QuestionsSagar Joshi
 
Top 10 Interview Questions for Coding Job.docx
Top 10 Interview Questions for Coding Job.docxTop 10 Interview Questions for Coding Job.docx
Top 10 Interview Questions for Coding Job.docxSurendra Gusain
 

Similar to Class 8th Book key board Chapter 5 Excersie.pptx (20)

Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
INF 103 Effective Communication/tutorialrank.com
 INF 103 Effective Communication/tutorialrank.com INF 103 Effective Communication/tutorialrank.com
INF 103 Effective Communication/tutorialrank.com
 
ONLINE ACCESSThank you for purchasing a new copy of In.docx
ONLINE ACCESSThank you for purchasing a new copy of In.docxONLINE ACCESSThank you for purchasing a new copy of In.docx
ONLINE ACCESSThank you for purchasing a new copy of In.docx
 
Whay QA- engineers should know how to code
Whay QA- engineers should know how to codeWhay QA- engineers should know how to code
Whay QA- engineers should know how to code
 
Nepali character classification
Nepali character classificationNepali character classification
Nepali character classification
 
Subtle Encipherment Hall
Subtle Encipherment HallSubtle Encipherment Hall
Subtle Encipherment Hall
 
4.Security Assessment And Testing
4.Security Assessment And Testing4.Security Assessment And Testing
4.Security Assessment And Testing
 
BoscoChat (A free Wi-Fi Chat Room in Android)
BoscoChat (A free Wi-Fi Chat Room in Android)BoscoChat (A free Wi-Fi Chat Room in Android)
BoscoChat (A free Wi-Fi Chat Room in Android)
 
01.intro
01.intro01.intro
01.intro
 
Bahan ajar bahasa inggris (procedure text)
Bahan ajar bahasa inggris (procedure text)Bahan ajar bahasa inggris (procedure text)
Bahan ajar bahasa inggris (procedure text)
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to start
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
InFS6830 Secure Programming Questions Page 7 of 7Essay.docx
InFS6830 Secure Programming Questions Page 7 of 7Essay.docxInFS6830 Secure Programming Questions Page 7 of 7Essay.docx
InFS6830 Secure Programming Questions Page 7 of 7Essay.docx
 
Algorithms and Application Programming
Algorithms and Application ProgrammingAlgorithms and Application Programming
Algorithms and Application Programming
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to Practice
 
How to become a software developer
How to become a software developerHow to become a software developer
How to become a software developer
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
C and CPP Interview Questions
C and CPP Interview QuestionsC and CPP Interview Questions
C and CPP Interview Questions
 
Top 10 Interview Questions for Coding Job.docx
Top 10 Interview Questions for Coding Job.docxTop 10 Interview Questions for Coding Job.docx
Top 10 Interview Questions for Coding Job.docx
 

Recently uploaded

Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 

Recently uploaded (20)

Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 

Class 8th Book key board Chapter 5 Excersie.pptx

  • 1. Chapter # 5 Advance Programming Teacher: Ahmad Zarif Contact # 0343-924-9404 Fazaia Inter College & School KOHAT
  • 2. Points for Copy Work Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 2
  • 3. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 3 Date H/W Chapter # MCQS Date H/W Chapter # Descriptive Types Question Date H/W Chapter # Application based Questions
  • 4. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 4 Date H/W Chapter # SLO MCQS Date H/W Chapter # Lab Questions Date H/W Chapter # Group Project
  • 5. Agenda 1) MCQS 2) Descriptive Type Question’s 3) Application Based Question 4) Lab Based Question 5) Group Questions 6) SLO Based MCQ’s 7) SLO Based Question’s Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 5
  • 6. Choose the Correct Option. a. A person that writes codes in different programming languages is known as ________? b. Which one of the following is not programming language? c. Which version of python did you learn in this chapter? d. Which of the following is an assignment operator? e. Which of the following is a loop in Python3? Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 6 i. A Programmer ii. A Technician iii. A Writer iv. A Polygot i. C++ ii. Java Script iii. Python iv. B++ i. Python1 ii. Python2 iii. Python3 iv. Python4 i. + ii. - iii. % iv. = i. For Loop ii. While Loop iii. None of These iv. All of these
  • 7. Descriptive Type Question a. Define programming language. What are the most commonly used programming languages? Answer: A programming language is the computer language or it is set of instructions, used by programmer and developers to write and develop different programs and software, a programming languages uses words form the English language, every programming language has its syntax, rules and structure, Common example of programming languages are: C Language: C languages is considered as the base for other programming languages, that is why it is known as mother language. C++ Language: C++ is an object-oriented programming language which gives a clear structure to programs. Java: Java is a high level, robust, object-oriented and secure programming language. Python: Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 7
  • 8. b. Differentiate between the types of programming languages. 1) Assembly Language: Define: Assembly language program is consisting of mnemonics that is translated into machine code. A program that is used for this conversion is known as assembler. Features: 1) It is a low-level programming language. 2) It allows programmers to use human readable code. 3) It allows complex jobs to run in a simpler way. 4) It helps in contacting the hardware directly. Application: It is used for coding device drivers, real time system, low level embedded systems, boot codes etc. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 8 Descriptive Type Question
  • 9. b. Differentiate between the types of programming languages. 2) C++ Define: C++ is an object-oriented programming language which gives a clear structure to programs. Features: 1) It is a mid level programming language. 2) It provides a structure approach of breaking a problem into separate part. 3) It is a portable language which means that it can be used on any platform. 4) It has a rich library and has a lot of built in functions. Application: It is used in operating system, web browsers, games, banking applications, software engineering, data structure Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 9 Descriptive Type Question
  • 10. b. Differentiate between the types of programming languages. 3) Java Define: Java is a general-purpose, class-based, object-oriented programming language Features: 1) It is considered as one of the easiest programming languages. 2) It is a portable languages which means that it can be used on any platform. 3) It is more secure than other programming languages. 4) It is capable of handling run time errors. Application: It is used in mobile applications, desktop graphics, user interface (GUI), web based gaming and cloud based application. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 10 Descriptive Type Question
  • 11. c. How do you install python on your computer? There are following steps for install python: 1) Go to google.com and search “Python download” 2) Click on the link. 3) Select your platform and click “Download Python 3.10.5”. 4) Choose the download location and wait for the file to download. 5) Click the downloaded file. 6) Select “Add python 3.10 to Path”. 7) Then click “Install Now”. 8) Wait for the installation to finish and then click “Close”. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 11 Descriptive Type Question
  • 12. d. How do you create and run a python program? There are following steps are included: 1) To start coding , create a new project. 2) Rename the project. 3) Click Create. 4) Erase everything in “main.py”. 5) start coding. 6) To run the code ,right click and select “Run main” or you can press Ctrl+Shift+F10. 7) To run python code, you must first download and install python. 8) Go to Google.com and search “Python download”. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 12 Descriptive Type Question
  • 13. e. How do you use blocks to create a script in Scratch? To use this block, just follow the following steps: 1. Click on the “My Blocks” button. 2. Click on “Make a Block”. 3. To add a number or text to your customized block, 4. Click on the first option of the three available options present at the extreme left. 5. To add a Boolean value to your customized block, 6. Click on the second option of the three available options present in the middle To add a label to your customized block, 7. Click on the third option of the three available options present at the extreme right. after creating the block and giving it a name, click on “OK” to move forward. 8. Once you click on “OK”, the new block will appear in the block palette Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 13 Descriptive Type Question
  • 14. f. Can you give some examples of different types of blocks that are available in Scratch? In Scratch we use following types of blocks, 1) Motion Block: Motion block is a type of block in the block palette. This type of block is used to c control the sprite's movement. 2) Looks Block: The script blocks under the looks category control the visual appearance of your sprite. these functions allow you to change your sprite's costume. 3) Control Block: The function of the control blocks is to control the movement of the sprite under certain conditions. 4) Events Block: Events blocks are blocks of code that are triggered by events. An event is something that happens in the program, such as a sprite being clicked on or a key being pressed. 5) Sensing Block: Sensing blocks are used to identify and measure how objects within a project are interacting with each other or to detect certain keyboard and mouse movement. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 14 Descriptive Type Question
  • 15. 1. Write the script in python to enter the marks of English, mathematics, and science and find the total and the percentage. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 15 Application Based Question English = 40 Mathematics = 55 Science = 53 total= English+Mathematics+Science percentage = (total/300)*100 print(total) print(percentage)
  • 16. 2. What are some common techniques for designing and implementing game mechanics in Scratch? Here are some common techniques and tips for designing and implementing game mechanics in Scratch: a) Character Movement: • Use the "Move" blocks to control the movement of characters or objects in your game. • Utilize arrow keys or other input controls to move characters smoothly. b) Collision Detection: • Use "If on edge, bounce" and "touching [sprite]" blocks to detect collisions between sprites. c) Level Design: • Design and build levels with different layouts and challenges. • Implement win conditions to advance to the next level. d) Testing and Iteration • Playtest your game frequently to identify and fix issues with game mechanics. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 16 Application Based Question
  • 17. 3. How do you use variables, conditions and loops to create more complex and interactive games in scratch? We use variable, conditions and loops to create more complex and interactive games in scratch by following ways: Add a variable in Scratch Click on Variables in the Code tab, then click on Make a Variable. Type in the name of your variable. You can choose whether you would like your variable to be available to all sprites, or to only this sprite. Add a Condition in Scratch Drag and drop an "if" block From the "Control" category in the Scratch blocks palette, you can find the "if" block. Drag this block to your project's scripting area. Add a loops in Scratch Drag a "Forever" block from the "Control" category in the blocks palette.Place the blocks you want to repeat indefinitely inside the "Forever" block. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 17 Application Based Question
  • 18. 1. Create a variable and assign a value to it. Then add 500 using the assignment operator. # Create a variable and assign a value to it my_variable = 100 # Use the assignment operator to add 500 to the variable my_variable += 500 # Print the updated value of the variable print(my_variable) Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 18 Lab Based Question
  • 19. 2. Print the table of two using the assignment operators. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 19 Lab Based Question # Multiplication table (from 1 to 10) in Python num = 2 # Iterate 10 times from i = 1 to 10 for i in range(1, 11): print(num, ‘x’ , i , ‘=‘ , num * i)
  • 20. 3. Enter the marks of three students , and find out who scored the highest using the comparison operator. Ahmad =40; Ali =34; Haleem =43; if Ahmad > Ali and Ahmad > Haleem: largest = Ahmad; elif Ali > Ahmad and Ali > Haleem: largest = Ali; else: largest = Haleem; print(largest) Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 20 Lab Based Question
  • 21. Code a simple calculator, take two numbers as user inputs. Give user conversion options to perform different mathematical operations on these numbers and print the out put. 21 Group Project n1 = float(input("Enter the first number")) n2 = float(input("Enter the second number")) op = input("What's the programming language you want to learn? ") match op: case "+": r = n1 + n2; print(r) case "-": r1 = n1 - n2; print(r1) case "*": r2 = n1 * n2; print(r2) case "/": r3 = n1 / n2; print(r3) case _: print("You Enter invalid operator")
  • 22. SLO MCQ’s 1. Drag and drop blocks is related to ________? 2. b. Text based programming languages in which programmers____________? 3. ______________ is example of a visual program. 4. ______________ is example of a textual program. 5. ____________ helps in contacting the hardware directly. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 22 i. A Programmer ii. Visual based iii. Textual iv. A Polygot i. Drag ii. Drop iii. Write Code iv. B++ i. Python1 ii. Python2 iii. Scratch iv. Textual i. C ii. C++ iii. Python iv. All of these i. C++ ii. Python iii. Assembly iv. All of these
  • 23. SLO MCQ’s 6. ________________ was the first programming language? 7. b. A programming language uses words from the _______ language? 8. Python 2 and Python 3 both the versions are ____________ from each other. 9. Python is an ___________ language. 10. Python is developed by_____________. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 23 i. C++ ii. A iii. FORTRAN iv. B Language i. High ii. English iii. Urdu iv. None i. Same ii. Different iii. Simple iv. Hard i. Compiler ii. Hard iii. Python iv. Interpreter i. Guido ii. Alex iii. Tonny iv. All of these
  • 24. SLO MCQ’s 11. ____________ operator is used to join a string and number? 12. Python does not have a command for declaring ___________. 13. “int” just assign a ___________ value. 14. “Float” just assign a____________value. 15. _____________ is simply a collection of characters or letters. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 24 i. ++ ii. + iii. “+” iv. “++” i. Text ii. Constant iii. Variable iv. None i. Float ii. Numeric iii. Text iv. Binary i. Text ii. Address iii. String iv. All of these i. Float ii. Numeric iii. Text iv. Binary 16. When the comparison statement is correct the output will be _________ i. ++ ii. + iii. True iv. False
  • 25. 1) Differentiate between visual and textual programming. Visual-based programming languages are ones that allow you to manipulate visual elements — e.g. drag and drop blocks — to make a program, as opposed to text-based programming languages, which have you write lines and lines of code to make a program. 2) Define Computer Program. Computer Program is a sequence of instructions written in a proper language through which the computer can understand and solve the problem given to it. It is the method by which the whole computing process is directed and controlled. 3) What is programming language? A programming language is a set of instructions written by a programmer to deliver instructions to the computer to perform and accomplish a task. 4) Describe python. Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for: • web development (server-side), • software development, • mathematics, • system scripting. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 25 SLO Based Questions
  • 26. 5) Write down the features of python. 6) Write the step for writing your python program. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 26 SLO Based Questions
  • 27. 5) Write the step for writing your python program. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 27 SLO Based Questions
  • 28. 6) Write the Algorithm to in which its IDE take two inputs and convert into integer and run the loop 10 time. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 28 SLO Based Questions
  • 29. 7) Write the Flowchart to in which its IDE take two inputs and convert into integer and run the loop 10 time. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 29 SLO Based Questions
  • 30. 8) Write the Python Code in which its IDE take two inputs and convert into integer and run the loop 10 time. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 30 SLO Based Questions
  • 31. 9) Briefly describe python syntax. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 31 SLO Based Questions
  • 32. 10) Write about datatypes mostly use in Python. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 32 SLO Based Questions
  • 33. 11) Explain different types of operator. a) Arithmetic Operator: Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 33 SLO Based Questions
  • 34. 11) Explain different types of operator. a) Assignment Operator Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 34 SLO Based Questions
  • 35. 11) Explain different types of operator. a) Comparison Operator Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 35 SLO Based Questions
  • 36. 12) Write the Python Code for All Arithmetic Operators. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 36 SLO Based Questions
  • 37. 13) Write the Python Code for Assignment Operator. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 37 SLO Based Questions
  • 38. 13) Write the Python Code for Compression Operator. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 38 SLO Based Questions
  • 39. 14) Write down the steps for Scratch new project. a) Add your sprite b) Add a backdrop 15) Write down the step for wizard movement. a) If/then movement b) Loop it c) Two directions Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 39 SLO Based Questions
  • 40. 16) Write down the program in scratch for the fire ball. Book page:104 Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 40 SLO Based Questions
  • 41. 17) Write down the step for create variable for player health. 18) Write down the program for player health. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 41 SLO Based Questions
  • 42. 19) Write down the program for Enemy health. Friday, April 5, 2024 Teacher : Ahmad Zarif Contact # 0343-924-9404 42 SLO Based Questions