SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Question 1:
Briefly respond to all the following questions. Make sure to
explain and backup your responses with facts and examples.
Consider the data flow “octopus,” as shown in Figure 8.1. How
can the analysis system gather data from all these sources that,
presumably, are protected themselves?
Length: Minimum of 600 words
Note: 1) Make sure to explain and backup your responses with
facts and examples. This assignment should be in APA format
and have to include at least two references.
2) Use the APA 7th professional template.
Question 2:
If an attacker can retrieve the API and libraries, then use these
to write an agent, and then get the attacker’s agent installed,
how should Digital Diskus protect itself from such an attack?
Should the business analytics system provide a method of
authentication of valid agents in order to protect against a
malicious one? Is the agent a worthy attack surface?
Length: Minimum of 400 words
Note: 1) Make sure to explain and backup your responses with
facts and examples. This assignment should be in APA format
and have to include at least two references.
2) Use the APA 7th professional template.
CSCI 333.01W Assignment 05
Functions
1. (20 points, 4 points each) True or False questions:
1) (4 points) (True/False) You must have a return statement in a
function
Answer:
2) (4 points) (True/False) When an argument with a default
parameter value is omitted in a function call, the interpreter
automatically passes the default parameter value in the call.
Answer:
3)(4 points) (True/False) A function cannot contain multiple
return statements.
Answer:
4) (4 points) (True/False) The following two print statements
output the same results:
def dif(length, width):
return length - width
print (dif (width = 10, length=2)) #1
print (dif (10, 2)) #2
Answer:
5) (4 points) (True/False) Once a code block terminates (e.g.,
when a function returns), all variables defined in that block “go
out of scope” and can no longer be accessed.
Answer:
2. (20 points, 4 points each) Multiple choice:
1) (4 points) A function with multiple parameters specifies them
in a(n) ________
a) semicolon separated list
b) comma-separated list
c) period-separated list
d) backslash-separated list
Answer:
2) (4 points) To define a function with an arbitrary argument
list, specify a parameter of the form:____
a) !args
b) #args
c) *args
d) ~args
Answer:
3) (4 points) To assign a value to a global variable in a
function, the global variable must be first declared in the
function
a) True
b) False
Answer:
4) (4 points) A statement in one function can access a local
variable in another function
a) True
b) False
Answer:
5) (4 points) The output for the following code is:
a) 9
def my_function (x):
x **2
print ( my_function (3))
b) 6
c) 8
d) None
Answer:
3. (20 points, 5 points each) Hand-trace the following code.
What is the output, or what error/problem do you observe and
why?
1) (5 points)
def cube (x):
return x ** 3
print(cube(2))
Output:
2) (5 points)
def my_function ( fname, lname):
print (fname + “ “ + lname)
my_function (“Emily”, “Chong”)
my_function (“Eddie”, “Lowes”)
my_function (“John”)
Output:
3) (5 points)
def main():
num1 = 10
num2 = 15
result = add() print(result)
def add(num1, num2):
return num1 + num2 main()
Output:
4) (5 points)
def main():
result = square(6) print('square(6):', result)
def square(number):
return number ** 2 main()# execution begins here
# when main returns, the script terminates here
Output:
4. (20 points) Define a maximum function that determines and
returns the largest of three values, calls the function three times
with integers, floating-point numbers, and strings, respectively
and print out the results.
For example:
maximum (15, 20, 36)
output is: 36
maximum (12,3, 17.8, 1.5)
output is: 1.5
maximum (‘apple’, ‘orange’, ’banana’)
output is: orange
· (15 points) Write the program here, or copy/paste the
screenshot of your program
· (3 points) Screenshot of a Program Run:
· (2 points) Save the program as “maximum.py”. Upload the .py
file as part of your submission.
Note:
You are implementing the maximum function in this exercise.
Actually, for many common tasks, the capabilities you need
already exist in Python. For example built-in function max() is
similar to what you are implementing here. Using built-in
functions or functions from the Python Standard Library’s
modules rather than writing your own can reduce development
time and increase program reliability, portability and
performance. For a list of Python’s build-in functions and
modules, please review here:
https://docs.python.org/3/library/index.html
5. (20 points) Implement a Fahrenheit function that returns the
Fahrenheit equivalent of a Celsius temperature. Use the
following formula:
F = (9 / 5) * C + 32
Use this function to print a chart showing the Fahrenheit
equivalents of all Cesium temperature in the range of 90-100
degrees (including 90 and 100 degrees). Use one digit of
precision of the results.
For example, some outputs:
· (15 points) Write your program here, or copy/paste a
screenshot of your Program:
· (3 points) copy/paste Program Run:
· (2 points) Save the program as “Fahrenheit.py”. Upload the
.py file as part of your submission.
6. Bonus Question: (20 points)
Write a recursive function for calculating n factorial: n!
Mathematically, n! = n x (n-1) x (n-2) x (n-3) x ……. x 3 x 2 x
1
From user input, get an integer number, print out the factorial
result for this number
Hint:
1) Decompose the original problem into simpler instance of the
same problem and get the recursive function, which is n! = n x
(n-1)!
2) Find the base/special case to terminate the recursion: 1! = 1
· (15 points) Write the program here, or copy/paste the
screenshot of your program
· (3 points) Screenshot of a Program Run:
· (2 points) Save the program as “factorialRecursive.py”.
Upload the .py file as part of your submission.
What to submit:
a) One word file (.doc(x)) named ”CSCI333-Assign5-
YourFirstLastName.doc”, including answers to all questions and
the python source code in text or screenshots of all programs.
b) All the Python source files (.py) of the programming
questions.
c) Create a folder named as “CSCI333-Assign5-
YourFirstLastName” and put the word file and Python source
files into one folder Submission
d) Zip (compress) the folder and submit the zipped file in
myLeo
Note: Partial credit will be given so do what you can and make
sure you show your work for each question. No credit be given
if no work is shown.
For example, as long as you submit the screenshot of the
programming result and the .py file, you will get the
corresponding points.
Submission example:
CSCI333-Assign5-YanLi.zip
-Assign5-YanLi.doc
2

Weitere ähnliche Inhalte

Was ist angesagt?

Ge6161 lab manual
Ge6161 lab manualGe6161 lab manual
Ge6161 lab manualMani Kandan
 
Methods In C-Sharp (C#)
Methods In C-Sharp (C#)Methods In C-Sharp (C#)
Methods In C-Sharp (C#)Abid Kohistani
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedDataminingTools Inc
 
Machine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionMachine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionPrasenjit Dey
 
Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web: Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web: butest
 
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013IMGS
 
WEKA: Data Mining Input Concepts Instances And Attributes
WEKA: Data Mining Input Concepts Instances And AttributesWEKA: Data Mining Input Concepts Instances And Attributes
WEKA: Data Mining Input Concepts Instances And AttributesDataminingTools Inc
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 

Was ist angesagt? (11)

Ge6161 lab manual
Ge6161 lab manualGe6161 lab manual
Ge6161 lab manual
 
Methods In C-Sharp (C#)
Methods In C-Sharp (C#)Methods In C-Sharp (C#)
Methods In C-Sharp (C#)
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been Learned
 
Machine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionMachine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regression
 
Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web: Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web:
 
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
 
Templates1
Templates1Templates1
Templates1
 
Problem solving and design
Problem solving and designProblem solving and design
Problem solving and design
 
WEKA: Data Mining Input Concepts Instances And Attributes
WEKA: Data Mining Input Concepts Instances And AttributesWEKA: Data Mining Input Concepts Instances And Attributes
WEKA: Data Mining Input Concepts Instances And Attributes
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 

Ähnlich wie Question 1 briefly respond to all the following questions. make

Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The BasicsRanel Padon
 
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docxSpring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docxrafbolet0
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answersdebarghyamukherjee60
 
Unit 2function in python.pptx
Unit 2function in python.pptxUnit 2function in python.pptx
Unit 2function in python.pptxvishnupriyapm4
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk PemulaOon Arfiandwi
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning materialArthyR3
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxAASTHA76
 
Educational Objectives After successfully completing this assignmen.pdf
Educational Objectives After successfully completing this assignmen.pdfEducational Objectives After successfully completing this assignmen.pdf
Educational Objectives After successfully completing this assignmen.pdfrajeshjangid1865
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpuDhaval Jalalpara
 
Unit 2function in python.pptx
Unit 2function in python.pptxUnit 2function in python.pptx
Unit 2function in python.pptxvishnupriyapm4
 
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxWeek 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxmelbruce90096
 
Compiler Construction for DLX Processor
Compiler Construction for DLX Processor Compiler Construction for DLX Processor
Compiler Construction for DLX Processor Soham Kulkarni
 
Python programming workshop session 4
Python programming workshop session 4Python programming workshop session 4
Python programming workshop session 4Abdul Haseeb
 
The Lab assignment will be graded out of 100 points.  There are .docx
The Lab assignment will be graded out of 100 points.  There are .docxThe Lab assignment will be graded out of 100 points.  There are .docx
The Lab assignment will be graded out of 100 points.  There are .docxjmindy
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C ProgrammingShuvongkor Barman
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21chinthala Vijaya Kumar
 

Ähnlich wie Question 1 briefly respond to all the following questions. make (20)

Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The Basics
 
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docxSpring 2014 CSCI 111 Final exam   of 1 61. (2 points) Fl.docx
Spring 2014 CSCI 111 Final exam of 1 61. (2 points) Fl.docx
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answers
 
Unit 2function in python.pptx
Unit 2function in python.pptxUnit 2function in python.pptx
Unit 2function in python.pptx
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk Pemula
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning material
 
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docxBTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
BTE 320-498 Summer 2017 Take Home Exam (200 poi.docx
 
Educational Objectives After successfully completing this assignmen.pdf
Educational Objectives After successfully completing this assignmen.pdfEducational Objectives After successfully completing this assignmen.pdf
Educational Objectives After successfully completing this assignmen.pdf
 
User defined functions in matlab
User defined functions in  matlabUser defined functions in  matlab
User defined functions in matlab
 
Python Manuel-R2021.pdf
Python Manuel-R2021.pdfPython Manuel-R2021.pdf
Python Manuel-R2021.pdf
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
 
Unit 2function in python.pptx
Unit 2function in python.pptxUnit 2function in python.pptx
Unit 2function in python.pptx
 
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxWeek 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
 
Compiler Construction for DLX Processor
Compiler Construction for DLX Processor Compiler Construction for DLX Processor
Compiler Construction for DLX Processor
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
Python programming workshop session 4
Python programming workshop session 4Python programming workshop session 4
Python programming workshop session 4
 
The Lab assignment will be graded out of 100 points.  There are .docx
The Lab assignment will be graded out of 100 points.  There are .docxThe Lab assignment will be graded out of 100 points.  There are .docx
The Lab assignment will be graded out of 100 points.  There are .docx
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Savitch ch 04
Savitch ch 04Savitch ch 04
Savitch ch 04
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
 

Mehr von YASHU40

April 19, 2018 Course #Title MATU-203 – Introduction.docx
April 19, 2018  Course #Title  MATU-203 – Introduction.docxApril 19, 2018  Course #Title  MATU-203 – Introduction.docx
April 19, 2018 Course #Title MATU-203 – Introduction.docxYASHU40
 
APUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docx
APUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docxAPUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docx
APUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docxYASHU40
 
Appropriate TopicsThe Research Report, select one of the fo.docx
Appropriate TopicsThe Research Report, select one of the fo.docxAppropriate TopicsThe Research Report, select one of the fo.docx
Appropriate TopicsThe Research Report, select one of the fo.docxYASHU40
 
Approaches, Issues, Applications edited by Steffen.docx
Approaches, Issues, Applications edited by Steffen.docxApproaches, Issues, Applications edited by Steffen.docx
Approaches, Issues, Applications edited by Steffen.docxYASHU40
 
Archaic sapiens, Neandertals and the Last 10,000 YearsWhat.docx
Archaic sapiens, Neandertals and the Last 10,000 YearsWhat.docxArchaic sapiens, Neandertals and the Last 10,000 YearsWhat.docx
Archaic sapiens, Neandertals and the Last 10,000 YearsWhat.docxYASHU40
 
Applying Evidence-Based Practice”Population groups with differe.docx
Applying Evidence-Based Practice”Population groups with differe.docxApplying Evidence-Based Practice”Population groups with differe.docx
Applying Evidence-Based Practice”Population groups with differe.docxYASHU40
 
Applying Learning Theory to LifePrior to beginning work on t.docx
Applying Learning Theory to LifePrior to beginning work on t.docxApplying Learning Theory to LifePrior to beginning work on t.docx
Applying Learning Theory to LifePrior to beginning work on t.docxYASHU40
 
Apply the Symbolic Interaction Perspective to ImmigrationD.docx
Apply the Symbolic Interaction Perspective to ImmigrationD.docxApply the Symbolic Interaction Perspective to ImmigrationD.docx
Apply the Symbolic Interaction Perspective to ImmigrationD.docxYASHU40
 
April is a fourth grader with a language impairment, but no physical.docx
April is a fourth grader with a language impairment, but no physical.docxApril is a fourth grader with a language impairment, but no physical.docx
April is a fourth grader with a language impairment, but no physical.docxYASHU40
 
Approximately 1000 words.Synthesizing the theories (you do not.docx
Approximately 1000 words.Synthesizing the theories (you do not.docxApproximately 1000 words.Synthesizing the theories (you do not.docx
Approximately 1000 words.Synthesizing the theories (you do not.docxYASHU40
 
Approaches to Forecasting Policy Outcomes Please respond to th.docx
Approaches to Forecasting Policy Outcomes Please respond to th.docxApproaches to Forecasting Policy Outcomes Please respond to th.docx
Approaches to Forecasting Policy Outcomes Please respond to th.docxYASHU40
 
Apply the course concepts of the dark side of self-esteem and .docx
Apply the course concepts of the dark side of self-esteem and .docxApply the course concepts of the dark side of self-esteem and .docx
Apply the course concepts of the dark side of self-esteem and .docxYASHU40
 
Apply information from the Aquifer Case Study to answer the foll.docx
Apply information from the Aquifer Case Study to answer the foll.docxApply information from the Aquifer Case Study to answer the foll.docx
Apply information from the Aquifer Case Study to answer the foll.docxYASHU40
 
Apply appropriate elements of the U.S. legal system and the U.S. Con.docx
Apply appropriate elements of the U.S. legal system and the U.S. Con.docxApply appropriate elements of the U.S. legal system and the U.S. Con.docx
Apply appropriate elements of the U.S. legal system and the U.S. Con.docxYASHU40
 
APA format Analysis of the Culture using a Culturally Competent.docx
APA format Analysis of the Culture using a Culturally Competent.docxAPA format Analysis of the Culture using a Culturally Competent.docx
APA format Analysis of the Culture using a Culturally Competent.docxYASHU40
 
APA less than 10 similarityWeek 7 Discussion Question Chapter.docx
APA less than 10  similarityWeek 7 Discussion Question Chapter.docxAPA less than 10  similarityWeek 7 Discussion Question Chapter.docx
APA less than 10 similarityWeek 7 Discussion Question Chapter.docxYASHU40
 
APPLE 13Business Analytics Plan for BIAM300Author Miguel .docx
APPLE 13Business Analytics Plan for BIAM300Author Miguel .docxAPPLE 13Business Analytics Plan for BIAM300Author Miguel .docx
APPLE 13Business Analytics Plan for BIAM300Author Miguel .docxYASHU40
 
APAless than 10 similarityWeek 4 Discussion Question .docx
APAless than 10  similarityWeek 4 Discussion Question .docxAPAless than 10  similarityWeek 4 Discussion Question .docx
APAless than 10 similarityWeek 4 Discussion Question .docxYASHU40
 
APA Style [Sources, included] single-spaced, one to two-page paper r.docx
APA Style [Sources, included] single-spaced, one to two-page paper r.docxAPA Style [Sources, included] single-spaced, one to two-page paper r.docx
APA Style [Sources, included] single-spaced, one to two-page paper r.docxYASHU40
 
Application Case Siemens Builds a Strategy-Oriented HR System.docx
Application Case Siemens Builds a Strategy-Oriented HR System.docxApplication Case Siemens Builds a Strategy-Oriented HR System.docx
Application Case Siemens Builds a Strategy-Oriented HR System.docxYASHU40
 

Mehr von YASHU40 (20)

April 19, 2018 Course #Title MATU-203 – Introduction.docx
April 19, 2018  Course #Title  MATU-203 – Introduction.docxApril 19, 2018  Course #Title  MATU-203 – Introduction.docx
April 19, 2018 Course #Title MATU-203 – Introduction.docx
 
APUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docx
APUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docxAPUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docx
APUS Assignment Rubric Undergraduate Level EXEMPLARYLEVEL4.docx
 
Appropriate TopicsThe Research Report, select one of the fo.docx
Appropriate TopicsThe Research Report, select one of the fo.docxAppropriate TopicsThe Research Report, select one of the fo.docx
Appropriate TopicsThe Research Report, select one of the fo.docx
 
Approaches, Issues, Applications edited by Steffen.docx
Approaches, Issues, Applications edited by Steffen.docxApproaches, Issues, Applications edited by Steffen.docx
Approaches, Issues, Applications edited by Steffen.docx
 
Archaic sapiens, Neandertals and the Last 10,000 YearsWhat.docx
Archaic sapiens, Neandertals and the Last 10,000 YearsWhat.docxArchaic sapiens, Neandertals and the Last 10,000 YearsWhat.docx
Archaic sapiens, Neandertals and the Last 10,000 YearsWhat.docx
 
Applying Evidence-Based Practice”Population groups with differe.docx
Applying Evidence-Based Practice”Population groups with differe.docxApplying Evidence-Based Practice”Population groups with differe.docx
Applying Evidence-Based Practice”Population groups with differe.docx
 
Applying Learning Theory to LifePrior to beginning work on t.docx
Applying Learning Theory to LifePrior to beginning work on t.docxApplying Learning Theory to LifePrior to beginning work on t.docx
Applying Learning Theory to LifePrior to beginning work on t.docx
 
Apply the Symbolic Interaction Perspective to ImmigrationD.docx
Apply the Symbolic Interaction Perspective to ImmigrationD.docxApply the Symbolic Interaction Perspective to ImmigrationD.docx
Apply the Symbolic Interaction Perspective to ImmigrationD.docx
 
April is a fourth grader with a language impairment, but no physical.docx
April is a fourth grader with a language impairment, but no physical.docxApril is a fourth grader with a language impairment, but no physical.docx
April is a fourth grader with a language impairment, but no physical.docx
 
Approximately 1000 words.Synthesizing the theories (you do not.docx
Approximately 1000 words.Synthesizing the theories (you do not.docxApproximately 1000 words.Synthesizing the theories (you do not.docx
Approximately 1000 words.Synthesizing the theories (you do not.docx
 
Approaches to Forecasting Policy Outcomes Please respond to th.docx
Approaches to Forecasting Policy Outcomes Please respond to th.docxApproaches to Forecasting Policy Outcomes Please respond to th.docx
Approaches to Forecasting Policy Outcomes Please respond to th.docx
 
Apply the course concepts of the dark side of self-esteem and .docx
Apply the course concepts of the dark side of self-esteem and .docxApply the course concepts of the dark side of self-esteem and .docx
Apply the course concepts of the dark side of self-esteem and .docx
 
Apply information from the Aquifer Case Study to answer the foll.docx
Apply information from the Aquifer Case Study to answer the foll.docxApply information from the Aquifer Case Study to answer the foll.docx
Apply information from the Aquifer Case Study to answer the foll.docx
 
Apply appropriate elements of the U.S. legal system and the U.S. Con.docx
Apply appropriate elements of the U.S. legal system and the U.S. Con.docxApply appropriate elements of the U.S. legal system and the U.S. Con.docx
Apply appropriate elements of the U.S. legal system and the U.S. Con.docx
 
APA format Analysis of the Culture using a Culturally Competent.docx
APA format Analysis of the Culture using a Culturally Competent.docxAPA format Analysis of the Culture using a Culturally Competent.docx
APA format Analysis of the Culture using a Culturally Competent.docx
 
APA less than 10 similarityWeek 7 Discussion Question Chapter.docx
APA less than 10  similarityWeek 7 Discussion Question Chapter.docxAPA less than 10  similarityWeek 7 Discussion Question Chapter.docx
APA less than 10 similarityWeek 7 Discussion Question Chapter.docx
 
APPLE 13Business Analytics Plan for BIAM300Author Miguel .docx
APPLE 13Business Analytics Plan for BIAM300Author Miguel .docxAPPLE 13Business Analytics Plan for BIAM300Author Miguel .docx
APPLE 13Business Analytics Plan for BIAM300Author Miguel .docx
 
APAless than 10 similarityWeek 4 Discussion Question .docx
APAless than 10  similarityWeek 4 Discussion Question .docxAPAless than 10  similarityWeek 4 Discussion Question .docx
APAless than 10 similarityWeek 4 Discussion Question .docx
 
APA Style [Sources, included] single-spaced, one to two-page paper r.docx
APA Style [Sources, included] single-spaced, one to two-page paper r.docxAPA Style [Sources, included] single-spaced, one to two-page paper r.docx
APA Style [Sources, included] single-spaced, one to two-page paper r.docx
 
Application Case Siemens Builds a Strategy-Oriented HR System.docx
Application Case Siemens Builds a Strategy-Oriented HR System.docxApplication Case Siemens Builds a Strategy-Oriented HR System.docx
Application Case Siemens Builds a Strategy-Oriented HR System.docx
 

Kürzlich hochgeladen

SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 

Kürzlich hochgeladen (20)

SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

Question 1 briefly respond to all the following questions. make

  • 1. Question 1: Briefly respond to all the following questions. Make sure to explain and backup your responses with facts and examples. Consider the data flow “octopus,” as shown in Figure 8.1. How can the analysis system gather data from all these sources that, presumably, are protected themselves? Length: Minimum of 600 words Note: 1) Make sure to explain and backup your responses with facts and examples. This assignment should be in APA format and have to include at least two references. 2) Use the APA 7th professional template. Question 2: If an attacker can retrieve the API and libraries, then use these to write an agent, and then get the attacker’s agent installed, how should Digital Diskus protect itself from such an attack? Should the business analytics system provide a method of authentication of valid agents in order to protect against a malicious one? Is the agent a worthy attack surface? Length: Minimum of 400 words Note: 1) Make sure to explain and backup your responses with facts and examples. This assignment should be in APA format and have to include at least two references. 2) Use the APA 7th professional template. CSCI 333.01W Assignment 05 Functions 1. (20 points, 4 points each) True or False questions: 1) (4 points) (True/False) You must have a return statement in a function
  • 2. Answer: 2) (4 points) (True/False) When an argument with a default parameter value is omitted in a function call, the interpreter automatically passes the default parameter value in the call. Answer: 3)(4 points) (True/False) A function cannot contain multiple return statements. Answer: 4) (4 points) (True/False) The following two print statements output the same results: def dif(length, width): return length - width print (dif (width = 10, length=2)) #1 print (dif (10, 2)) #2 Answer: 5) (4 points) (True/False) Once a code block terminates (e.g., when a function returns), all variables defined in that block “go out of scope” and can no longer be accessed. Answer: 2. (20 points, 4 points each) Multiple choice:
  • 3. 1) (4 points) A function with multiple parameters specifies them in a(n) ________ a) semicolon separated list b) comma-separated list c) period-separated list d) backslash-separated list Answer: 2) (4 points) To define a function with an arbitrary argument list, specify a parameter of the form:____ a) !args b) #args c) *args d) ~args Answer: 3) (4 points) To assign a value to a global variable in a function, the global variable must be first declared in the function a) True b) False Answer: 4) (4 points) A statement in one function can access a local variable in another function a) True b) False Answer: 5) (4 points) The output for the following code is: a) 9 def my_function (x): x **2
  • 4. print ( my_function (3)) b) 6 c) 8 d) None Answer: 3. (20 points, 5 points each) Hand-trace the following code. What is the output, or what error/problem do you observe and why? 1) (5 points) def cube (x): return x ** 3 print(cube(2)) Output: 2) (5 points) def my_function ( fname, lname): print (fname + “ “ + lname) my_function (“Emily”, “Chong”) my_function (“Eddie”, “Lowes”) my_function (“John”) Output:
  • 5. 3) (5 points) def main(): num1 = 10 num2 = 15 result = add() print(result) def add(num1, num2): return num1 + num2 main() Output: 4) (5 points) def main(): result = square(6) print('square(6):', result) def square(number): return number ** 2 main()# execution begins here # when main returns, the script terminates here Output: 4. (20 points) Define a maximum function that determines and returns the largest of three values, calls the function three times with integers, floating-point numbers, and strings, respectively and print out the results.
  • 6. For example: maximum (15, 20, 36) output is: 36 maximum (12,3, 17.8, 1.5) output is: 1.5 maximum (‘apple’, ‘orange’, ’banana’) output is: orange · (15 points) Write the program here, or copy/paste the screenshot of your program · (3 points) Screenshot of a Program Run: · (2 points) Save the program as “maximum.py”. Upload the .py file as part of your submission. Note: You are implementing the maximum function in this exercise. Actually, for many common tasks, the capabilities you need already exist in Python. For example built-in function max() is similar to what you are implementing here. Using built-in functions or functions from the Python Standard Library’s
  • 7. modules rather than writing your own can reduce development time and increase program reliability, portability and performance. For a list of Python’s build-in functions and modules, please review here: https://docs.python.org/3/library/index.html 5. (20 points) Implement a Fahrenheit function that returns the Fahrenheit equivalent of a Celsius temperature. Use the following formula: F = (9 / 5) * C + 32 Use this function to print a chart showing the Fahrenheit equivalents of all Cesium temperature in the range of 90-100 degrees (including 90 and 100 degrees). Use one digit of precision of the results. For example, some outputs: · (15 points) Write your program here, or copy/paste a screenshot of your Program: · (3 points) copy/paste Program Run:
  • 8. · (2 points) Save the program as “Fahrenheit.py”. Upload the .py file as part of your submission. 6. Bonus Question: (20 points) Write a recursive function for calculating n factorial: n! Mathematically, n! = n x (n-1) x (n-2) x (n-3) x ……. x 3 x 2 x 1 From user input, get an integer number, print out the factorial result for this number Hint: 1) Decompose the original problem into simpler instance of the same problem and get the recursive function, which is n! = n x (n-1)! 2) Find the base/special case to terminate the recursion: 1! = 1 · (15 points) Write the program here, or copy/paste the screenshot of your program · (3 points) Screenshot of a Program Run: · (2 points) Save the program as “factorialRecursive.py”. Upload the .py file as part of your submission.
  • 9. What to submit: a) One word file (.doc(x)) named ”CSCI333-Assign5- YourFirstLastName.doc”, including answers to all questions and the python source code in text or screenshots of all programs. b) All the Python source files (.py) of the programming questions. c) Create a folder named as “CSCI333-Assign5- YourFirstLastName” and put the word file and Python source files into one folder Submission d) Zip (compress) the folder and submit the zipped file in myLeo Note: Partial credit will be given so do what you can and make sure you show your work for each question. No credit be given if no work is shown. For example, as long as you submit the screenshot of the programming result and the .py file, you will get the corresponding points. Submission example: CSCI333-Assign5-YanLi.zip -Assign5-YanLi.doc 2