This document discusses solutions to creative problems using functions. It presents four creative questions that involve using a black box function to multiply matrices in different ways. The black box functions take matrices as input and output their product or square. The questions demonstrate how to use the black box functions to multiply two arbitrary matrices by decomposing the matrices in ways compatible with the black box functions. It also discusses general concepts of using functions to break down large tasks, hide implementation details, and build on existing functionality through modular programming.
Basics of Iterators and Generators,Uses of iterators and generators in python. advantage of iterators and generators. difference between generators and iterators.
This is an PPT of C++. This includes the topic of Parameter such as"Reference Parameter, Passing object by reference, constant parameter & Default parameter. "
Basics of Iterators and Generators,Uses of iterators and generators in python. advantage of iterators and generators. difference between generators and iterators.
This is an PPT of C++. This includes the topic of Parameter such as"Reference Parameter, Passing object by reference, constant parameter & Default parameter. "
It tells about functions in C++,Types,Use,prototype,declaration,Arguments etc
function with
A function with no parameter and no return value
A function with parameter and no return value
A function with parameter and return value
A function without parameter and return value
Call by value and address
Library Functions, User defined functions, Recursion, Function declaration, Local and global variables, Use of array in function, Passing by Value, Passing by Address
https://github.com/ashim888/csit-c
Programming Fundamentals Functions in C and typesimtiazalijoono
Programming Fundamentals
Functions in C
Lecture Outline
• Functions
• Function declaration
• Function call
• Function definition
– Passing arguments to function
1) Passing constants
2) Passing variables
– Pass by value
– Returning values from functions
• Preprocessor directives
• Local and external variables
This presentation is a part of the COP2272C college level course taught at the Florida Polytechnic University located in Lakeland Florida. The purpose of this course is to introduce students to the C++ language and the fundamentals of object orientated programming..
The course is one semester in length and meets for 2 hours twice a week. The Instructor is Dr. Jim Anderson.
A KEYNOTE ON GOOGLE SUMMER OF CODE.
PS: I USED LOT OF CONTENT FROM FELLOW OPEN SOURCE CONTRIBUTORS OF SRILANKA. I AM VERY GRATEFUL TO THEM : SURANGA[OPENMRS] PRADEEBAN[ABIWORD] AND HARSHA[OPENMRS]
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
2. Creative Question
• Given a Black box that takes as input
two symmetric matrices and outputs the
product of the same, use the black box
to multiple two arbitrary matrices.
3. a b
x
c d
0 0 a b
0 0 c d
a c 0 0
b d 0 0
e g
f h
x
=
p q
r s
0 0 e f
0 0 g h
e g 0 0
f h 0 0
p
r
0
0
q
s
0
0
0 0
0 0
u v
wx
4. Creative Question
• Given a Black box that takes as input a
matrix and outputs the square of the
same, use the black box to multiple two
arbitrary matrices.
5. a b
x
c d
0 0 a b
0 0 c d
e g 0 0
f h 0 0
e g
f h
x
=
p q
r s
0 0 a b
0 0 c d
e g 0 0
f h 0 0
p
r
0
0
q
s
0
0
0 0
0 0
u v
wx
6. Creative Question
• Given a Black box that takes as input a
lower triangular matrix and an upper
triangular matrix and outputs the
product of the same, use the black box
to multiple two arbitrary square
matrices.
7. a b
x
c d
0 0 0 0
0 0 0 0
a b 0 0
c d 0 0
e g
f h
x
=
p q
r s
0 0 e g
0 0 f h
0 0 0 0
0 0 0 0
0
0
0
0
0
0
0
0
0
0
p
r
0
0
q
s
8. Creative Question
• Given a Black box that takes as input
two lower triangular matrices and
outputs the product of the same, use
the black box to multiple two arbitrary
square matrices.
10. Functions = outsourcing
• Break large computing tasks into small ones
• Helps you to build on what others have done
• You and others write functions
• When you want to build a program, find out how to use
the function and use it.
• Use standard functions provided by the
library.
• You are hidden from the implementation
• Example – you don’t have to worry about how pow(m,n)
is implemented
• As engineers from different disciplines you
will use and develop different set of functions
11. Modular Programming
Subprograms
functions in C, C++, procedures and functions in
Pascal
facilitate modular programming
Overall task is divided into modules
Each module - a collection of subprograms
a subprogram may be invoked at several points
A commonly used computation
hiding the implementation
incorporating changes
easier
12. Example of function sets
• String manipulation
• Mathematical
• Finite Element Method
• Used in structural analysis by Mechanical, Civil, Aero,
etc. for stress calculations etc.
• Most function libraries cost a lot
• Business opportunity – identify functions that are useful
to you area of study, create libraries.
• Functions for use in different software.
• Say, functions for web services
13. Basics
• Function is a part of your program.
• It cannot be a part of any other function
• Main() is a function: it is the main function. Execution starts
there or the control flow starts there
• From there it can flow from one function to another, return after
a computation with some values, probably, and then flow on.
• Transfer of control is affected by calling a function
•
•
•
•
•
•
•
With a function call, we pass some parameters
These parameters are used within the function
A value is computed
The value is returned to the function which initiated the call
The calling function can ignore the value returned
It could use it in some other computation
A function could call itself, these are called recursive function
calls
14. Add function to your Program
• A program was a set of variables, and
assignments to variables
• Now add function to it.
•
•
•
•
Set of variables
Some functions including main()
Communicating values to each other
Computing and returning values for each other
• Instead of one long program, we now write
structured program composed of functions
15. Features
• C program -- a collection of functions
– function main ( ) - mandatory - program starts here.
• C is not a block structured language
– a function can not be defined inside another function
– only variables can be defined in functions / blocks
• Variables can be defined outside of all functions
– global variables - accessible to all functions
– a means of sharing data between functions - caution
• Recursion is possible
– a function can call itself - directly or indirectly
17. Function Definition in C
return-type function-name (argument declarations)
{
variable/constant declarations and
No function
statements }
declarations here!
Arguments or parameters:
the means of giving input to the function
type and name of arguments are declared
names are formal - local to the function
Return Value: for giving the output value
return ( expression ); -- optional
Invoking a function: funct-name(exp1,exp2,…,expn)
Matching the
number and type
of arguments
18. Function Prototype
• defines
– the number of parameters, type of each
parameter,
– type of the return value of a function
• used by the compiler to check the usage
– prevents execution-time errors
• function prototype of power function
– int power ( int, int );
– no need for naming the parameters
• function prototypes - given in the beginning
19. Power Function
#include <stdio.h>
function prototype
int power (int, int);
-- Computes the nth
power of base.
main () {
for ( int i = 0; i < 20; i ++ )
printf(“%d %d %dn”, i, power(3,i), power(-4,i);}
int power (int base, int n) {
int i, p = 1;
for ( i = 1; i <= n ; i ++)
p = p ∗ base;
return p;
}
A block
Invocation with
arguments
20. Calling Power Function with i=3
printf(“%d %d %dn”, i, power(3,i), power(-4,i);}
27
int power (int base, int n) {
int i, p = 1;
for ( i = 1; i <= n ; i ++)
p = p ∗ base;
return p;
}
-64
int power (int base, int n) {
int i, p = 1;
for ( i = 1; i <= n ; i ++)
p = p ∗ base;
return p;
}
21. Thank You
• For Exam
– Bring BOTH your Institute ID card and RFID card - else you shall not be permitted to
write the exam.
• All the Best