0% found this document useful (0 votes)
10 views3 pages

Types of Loops and Functions in Programming

Uploaded by

Renu Mittal
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Types of Loops and Functions in Programming

Uploaded by

Renu Mittal
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

What are different type of loops?

The different loops are while, for and nested loops

 For: - For loop is used with sequence of items.


 While: -while loop continue executing a set of action until a certain condition is true.
 Nested Loop are loop within a loop creating complex pattern.

What is Exit criteria?

Exit Criteria is the condition that must be met before completing the specific task it is the set of
condition that must exist before you declare and program to be complete.

What is Exit criteria? For while loop.

Exit criteria for while loop is when the condition become false it terminates.

What is Exit criteria? For “For” loop.

Exit Criteria for “for” loop is when the loop reaches the specific number of iterations

When the conditional statement is no longer true.

What are function in programming?

Function is the reusable piece of code that performs the specific task. Functions are used to organize
and modularize code making it readable, reusable and efficient.

What are the benefits of using functions?

It makes the length of the program shorter it makes the code more organised add easier to manage.

Is it possible to return a value from a function? If yes how?

Yes, it is possible to return a value from a function by using a return keyword. To return a value from
a function you use the return keyword within the function body followed by the value you want to
send back to the calling code. This tells the function to exit and provides the specified value as the
result of the function call

What are function parameters?

Function parameters are the variables that are defined in the function body to perform the set of
tasks

Define Data?

Data is distinct information stored for processing or analysis, including numbers, text, images, and
sound, representing real-world entities in a computer-friendly format.

What is dispute data provide an example.

Discrete data is countable distinct and has separate values for example the number of employees in a
company

What is the primary purpose of data visualization


Data visualization is the graphical representation of information and data by using visual elements
like charts graphs and maps data visualization tools provide an accessible way to see can understand
trends outlets and patterns in data.

Differentiate between qualitative and quantitative data with an example of each

Qualitative data represents categories and is descriptive examples of colour, types of fruit and names
of countries

Quantitative data represents quantities and can be measured and counted for example age, height
and income are examples of quantitative data.

Name two industries where data science is applied.

Two examples of data science are:

1. Healthcare – Used for predictive analysis, drug discovery, and improving healthcare
outcomes.

2. Finance – Applied in risk assessment, fraud detection, and investment predictions.

What is the importance of collecting relevant data?

Collecting relevant data is essential for accurate analysis and decision-making. It ensures that insights
are meaningful, actionable, and reflect reality.

Define artificial intelligence in a sentence

Artificial intelligence is the study and development of smart systems that analyze their environment
and take actions to maximize success.

List four advantages of AI over human-intelligence

Four advantages of AI over human intelligence are:

 Process information faster


 Highly objective
 More accurate
 Less Biased

Briefly explain the stages involved in the AI project cycle

The AI project cycles refer to the series of steps or phases involved in developing an artificial
intelligence system, such as problem definition, data collection, data preprocessing, model selection
and development, model training, model evaluation, model deployment, monitoring and
maintenance and a feedback loop.

Name one ethical risk associated with the adoption of AI

Ethical risks involve the moral rules that guide how AI is used.

What is machine learning and how does it relate to artificial intelligence

Machine learning is a part of AI that helps systems learn and improve from experience without
explicit programming.
What is the main objective of natural language processing and how it enables computers to work
with human language efficiently?

Natural language processing is a technology that gives computers the ability to understand and work
with human language. It is used for translation, answering questions, and chatting.

You might also like