Review Test Submission_ Chapter Thirteen Quiz - Recursion &
.pdf
keyboard_arrow_up
School
Lanier Technical College *
*We aren’t endorsed by this school
Course
1305
Subject
Computer Science
Date
Feb 20, 2024
Type
Pages
8
Uploaded by HighnessFlowerCat77
4/18/22, 10:38 PM
Review Test Submission: Chapter Thirteen Quiz - Recursion &...
https://laniertech.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3892446_1&course_id=_19073_1&content_id=_2492975_1&r…
1/8
Review Test Submission: Chapter Thirteen Quiz - Recursion
CIST1305: Program Design & Development (ON-LINE COURSE) 40403
Module 14-Chapter 13
Activities & Assignments (one week to complete)
Review Test Submission: Chapter Thirteen Quiz - Recursion
User
Francisco Oviedo-Mancilla
Course
CIST1305: Program Design & Development (ON-LINE COURSE) 40403
Test
Chapter Thirteen Quiz - Recursion
Started
4/18/22 10:08 PM
Submitted
4/18/22 10:38 PM
Due Date
4/18/22 11:59 PM
Status
Completed
Attempt Score
96 out of 100 points Time Elapsed
29 minutes out of 1 hour
Results
Displayed
All Answers, Submitted Answers, Correct Answers, Incorrectly Answered
Questions
Question 1
Selected Answer:
Answers:
The process of calling a module requires several actions to be performed by the
computer and is referred to as ________.
Overhead
Overhead
Maintenance
memory intensive
Inefficiency
None of these
Question 2
Selected
Answer:
The ±rst step in setting up a recursive module is to ________.
Identify at least one case in which the problem can be solved
without recursion
Lanier Tech
Noti±cations
Online Resources
4 out of 4 points
4 out of 4 points
Francisco Oviedo-Mancilla
15
4/18/22, 10:38 PM
Review Test Submission: Chapter Thirteen Quiz - Recursion &...
https://laniertech.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3892446_1&course_id=_19073_1&content_id=_2492975_1&r…
2/8
Answers:
Identify at least one case in which the problem can be solved with
recursion
Identify at least one case in which the problem can be solved
without recursion
Identify the case with the repetitive block
Identify the case without the repetitive block
None of these
Question 3
Selected Answer:
Answers:
When the recursive module makes the last call to itself, the If-Then statements
condition expression is ________.
false
True
0
false
Unpredictable
1
Question 4
Selected Answer:
Answers:
Recursion can be a powerful tool for solving ________ problems.
Repetitive
Complex decision
Repetitive
Multiple selections
Mathematical
None of these
Question 5
A problem can be solved with recursion if it can be broken down into ________
that are identical to the overall problem.
4 out of 4 points
4 out of 4 points
4 out of 4 points
4/18/22, 10:38 PM
Review Test Submission: Chapter Thirteen Quiz - Recursion &...
https://laniertech.blackboard.com/webapps/assessment/review/review.jsp?attempt_id=_3892446_1&course_id=_19073_1&content_id=_2492975_1&r…
3/8
Selected Answer:
Answers:
Successive smaller problems
Successive smaller problems
Successive smaller modules
Smaller problems
Smaller modules
None of these
Question 6
Selected Answer:
False
Answers:
True
False
The depth of recursion refers to the length and complexity of the recursive
algorithm.
Question 7
Selected Answer:
Answers:
When module A is calling module B and module B calls module A, it is called
________ recursion.
Indirect
B to A and A to B call
A to B and B to A call
Loop
Indirect
None of these
Question 8
Selected Answer:
Answers:
In the ________ case the problem is reduced to a smaller version of the original
problem.
Recursive
Base
Recursive
Loop
4 out of 4 points
4 out of 4 points
4 out of 4 points
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
i have put the heml code in this link
https://www.bartleby.com/questions-and-answers/computer-science-question/2dd76e1e-c1ac-4c6b-9e78-8b1c8a3f9add
-----------
var img = document.getElementById("elephant");var modalImg = document.getElementById("img01");modal.style.display = "block";console.log(modal.style.display);modalImg.src = "x.jpg";// Get the <span> element that closes the modalvar span = document.getElementsByClassName("close")[0];// When the user clicks on <span> (x), close the modalspan.onclick = function() {modal.style.display = "none";}}
function myBear() {var modal = document.getElementById("myModal");// Get the image and insert it inside the modal - use its "alt" text as a captionvar img = document.getElementById("bear");var modalImg = document.getElementById("img01");modal.style.display = "block";console.log(modal.style.display);modalImg.src = "xl.jpg";// Get the <span> element that closes the modalvar span =…
arrow_forward
Estem.org/courses/64525/assignments/9460783?module_item_id=18078917
The following information can help you get started:
• Invitation Details: it boils down to when and where
o When: Time and date
• Where: Address
• Invitee List: Name and email
• Name: First Name, or First Name and Last Name
Email: Email address
. Other considerations:
After you complete your invitation, answer the following questions:
1. What type of data are time, date, and place? How are they different from the other data types on the
invite and guest list?
F4
A
Additional information worth including: dress code, directions, gifting, how to contact you.
. How will you know who is showing up? RSVP?
. Is there a theme to your invitation/design?
x
F5
%
F6
F7
DELL
F8
F9
ROMNA
F10
F11
PrtScr
arrow_forward
https://www.bartleby.com/solution-answer/chapter-8-problem-831asme-c-how-to-program-8th-edition-8th-edition/9780133976892/text-analysis-the-availability-of-computers-with-string-manipulation-capabilities-has-resulted-in/386e175f-972a-4cc8-9399-66ee0054a0bd
arrow_forward
BbPython Online - 2022 Fall ET 574 X
= CO
Bing
Links
H
Remaining Time: 1 hour, 42 minutes, 51 seconds.
Question Completion Status:
P
Online Python - IDE, Editor, Con X Bb Take Test: ET574 Coding Final Ex
bbhosted.cuny.edu/webapps/assessment/take/launch.jsp?course_assessment_id=_2271631_1&course_ic
QUESTION 7
Implement the following:
1) Write a function randFive() with one parameter n.
2) randFive() create five random integers in the range (1, n) inclusive.
3) Five numbers should be stored in a list as the return value.
Call the function, randFive() with the argument, 100.
5) Print the result of the function call.
randFive() can generate any five numbers.
Make sure to precisely match the output format below.
Write your code in the ANSWER area provided below (must include comments if using code is not covered in the course).
Example Output
[1, 20, 9, 84, 46]
For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).
BIUS Paragraph V Arial
0
P
QUESTION 8
4
Click Save and Submit to save and…
arrow_forward
Lecture 7
DHTML with jQuery
Lab Exercise 1
Display the text "Welcome to the world of jQuery" on clicking a button using jQuery.
arrow_forward
Downloads/
E ID-21201491;name-Nuzhat Taba: X
+
English
O localhost:8888/notebooks/Downloads/ID-21201491%3Bname-Nuzhat%20Tabassum%3B%20sec%20-%2017%3B%20CSE110%3B%20Lab%20assignment%2004.ipynb
Cjupyter ID-21201491;name-Nuzhat Tabassum; sec - 17; CSE110;... Last Checkpoint: Last Tuesday at 10:45 PM (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
+
> Run
Code
=========
===== ===== ==
In [7]: #to do
Task 13
Write a Python program that reads 5 numbers into a list and prints the smallest and largest number and their locations in the list. [You are not allowed to use
the max(), min(), sort(), sorted() functions here]
Hint: You may assume the first input to be the largest value initially and the largest value's location to be 0. Similarly, you can assume the first input to be the
smallest value initially and the smallest value's location to be 0.
Note: You may need to be careful while printing the output. Depending on your code, you might need data…
arrow_forward
AutoSave O ff
INT201 0OP_Lab8_ 2020-2 - Protected View - Saved to this PC
Search
Anass Alhami
困
File
Home
Insert
Draw
Design
Layout
References
Mailings
Review
View
Help
A Share
O Comments
PROTECTED VIEW Be careful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View.
Enable Editing
Exercise 1
Write a recursive method that returns the sum of the squares of the first n positive integers. Test your
method.
Exercise 2
Write a recursive method that returns the sum of the first n odd positive integers. Test your method.
Exercise 3
Write a recursive method that returns the sum of the first n elements of an array. Test your method.
Exercise 4
Write a recursive method that returns the power x". Test your method.
Exercise 5
Write a recursive Boolean method that determines whether a string is a palindrome. Test your method.
Exercise 6
Write a recursive method that returns a string that contains the binary representation of a positive
integer.…
arrow_forward
Please help with the 1 Python question
Data File: https://docs.google.com/spreadsheets/d/1-S_xnAQXa1QCoWQt7xyvxo42XRNC1QBd/edit?usp=sharing&ouid=112107649557425878726&rtpof=true&sd=true
%%capture############################################################## EXECUTE THIS CELL BEFORE YOU TO TEST YOUR SOLUTIONS ##############################################################import imp, os, syssol = imp.load_compiled("solutions", "./solutions.py")sol.get_solutions("imdb.xlsx")from nose.tools import assert_equalfrom pandas.util.testing import assert_frame_equal, assert_series_equal
# Loading the dataimport pandas as pdimport numpy as np
xls = pd.ExcelFile('imdb.xlsx')df = xls.parse('imdb')df_directors = xls.parse('directors')df_countries = xls.parse('countries')
df = pd.merge(left=df, right=df_countries, how='inner', left_on='country_id', right_on='id')
df = pd.merge(left=df, right=df_directors, how='inner', left_on='director_id',…
arrow_forward
remove the value user inputted only not the key
example
Firstname [firstname]: John
Middlename [middlename]: George
Lastname [lastname]: Doe
A for ADD
D for DELETE
Any key for END
when enter 'D'
lastname
Firstname [firstname]: John
Middlename [middlename]: George
Lastname [lastname]:
A for ADD
D for DELETE
Any key for END
only the inputted will be remove not together the lastname
names = {"firstname":"","middlename":"","lastname":""}
choice = "A"while choice == "A" or choice == "D":print("\n\t A for ADD\n\t D for DELETE\n\t Any key for END")choice = input("\n\t Your choice: ")for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)if choice == "A":key = input("\n\t Enter key: ")value = input("\n\t Enter value: ")names.update({key:value})for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)elif choice == "D":delete_key = input("\n\t Enter key: ")names.pop(delete_key)for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)else:print("\n\t…
arrow_forward
Ans p please question as code.
arrow_forward
python porogram
-- What is the syntax for obtaining the index of the maximum value of A? (Hint, see documentation for numpy argmax)
arrow_forward
ires = 0;
for indexl = 10:-2:1
for index2 = 2:2:index1
if index2 == 6
break
end
ires = ires + index23;
end
end
ires =
number of times (outer loop)
number of times (inner loop)
arrow_forward
Answer with step by step explanations the following question.
arrow_forward
i need the answer quickly
arrow_forward
The Fibonacci Function with an Iteration
Calculate a Fibonacci sequenceYou work in an IT firm, and your colleague has realized that being able to quickly compute elements of the Fibonacci sequence will reduce the time taken to execute the testing suite on one of your internal applications. You will use an iterative approach to create a fibonacci_iterative function that returns the nth value in the Fibonacci sequence.
Create a fibonacci.py file.
Define a fibonacci_iterative function that takes a single positional argument representing which number term in the sequence you want to return.
Run the following code:
from fibonacci import fibonacci_iterativefibonacci_iterative(3)You should get the following output:2Another example to test your code can be as mentioned in the following code snippet:
fibonacci_iterative(10)
You should get the following output:55
In [ ]:
Then Remake your previous fibonacci program as a recursive function
In [ ]:
arrow_forward
Which two statements are true about the heat orchestration
template shown in the exhibit? (Choose two.)
heat_template_version: 2015-04-30
description: Simple template to deploy a single compute instance
Only the m1.small flavor can be used for
deployment.
parameters:
key_name:
type: string
label: Key Name
description: Name of key-pair to be used for compute instance
image_id:
type: string
label: Image ID
description: Image to be used for compute instance
instance_type:
type: string
label: Instance Type
description: Type of instance (flavor) to be used
default: m1.small
The resources section is required and
must contain at least one resource
definition.
The heat_template_version is an optional
key.
The image to create the compute instance
is provided as a parameter at runtime.
resources:
my_instance:
type: OS::Nova:Server
properties:
key_name: { get_param: key_name }
image: { get_param: image_id}
flavor: {get_param: instance_type )
JUNIPer
NETWORKS
arrow_forward
4:04
l LTE
4:04
i LTE
DB Quiz No.5 (12:30@ULJI selga)
DB Quiz No.5 (12:30@ouI selga)
CREATE TABLE Institution (name
VARCHAR(50),country VARCHAR(50).year
CREATE TABLE HighDegree
(professorID INT REFERENCES
Professor(ID).projectID INT REFERENCES
Project(ID),schoolName
VARCHAR(50),institutionName
VARCHAR(50), FOREIGN KEY
(schoolName,institutionName)
REFERENCES
School(name.,insitutionName), PRIMARY
KEY (professorID, studentID, schoolName,
institutionName);
O Number
INT,
(name, country):
PRIMARY KEY
O
Name and Num
WA
The following is an instance of the relation:
CREATE TABLE Author (researcherlD INT
REFERENCES Researcher(ID),.paperID INT
REFERENCES Paper(ID).PRIMARY KEY
(researcherlD, paperID));
O Name
Based on the above, indicate for each of the
following sets of attributes whether it is a
key for Articles Table?
CREATE TABLE PartOf (professorID INT
REFERENCES Professor(ID), studentID INT
REFERENCES Researcher(ID),PRIMARY
KEY (professorID, projectID);
Indicate which one of the following…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Related Questions
- i have put the heml code in this link https://www.bartleby.com/questions-and-answers/computer-science-question/2dd76e1e-c1ac-4c6b-9e78-8b1c8a3f9add ----------- var img = document.getElementById("elephant");var modalImg = document.getElementById("img01");modal.style.display = "block";console.log(modal.style.display);modalImg.src = "x.jpg";// Get the <span> element that closes the modalvar span = document.getElementsByClassName("close")[0];// When the user clicks on <span> (x), close the modalspan.onclick = function() {modal.style.display = "none";}} function myBear() {var modal = document.getElementById("myModal");// Get the image and insert it inside the modal - use its "alt" text as a captionvar img = document.getElementById("bear");var modalImg = document.getElementById("img01");modal.style.display = "block";console.log(modal.style.display);modalImg.src = "xl.jpg";// Get the <span> element that closes the modalvar span =…arrow_forwardEstem.org/courses/64525/assignments/9460783?module_item_id=18078917 The following information can help you get started: • Invitation Details: it boils down to when and where o When: Time and date • Where: Address • Invitee List: Name and email • Name: First Name, or First Name and Last Name Email: Email address . Other considerations: After you complete your invitation, answer the following questions: 1. What type of data are time, date, and place? How are they different from the other data types on the invite and guest list? F4 A Additional information worth including: dress code, directions, gifting, how to contact you. . How will you know who is showing up? RSVP? . Is there a theme to your invitation/design? x F5 % F6 F7 DELL F8 F9 ROMNA F10 F11 PrtScrarrow_forwardhttps://www.bartleby.com/solution-answer/chapter-8-problem-831asme-c-how-to-program-8th-edition-8th-edition/9780133976892/text-analysis-the-availability-of-computers-with-string-manipulation-capabilities-has-resulted-in/386e175f-972a-4cc8-9399-66ee0054a0bdarrow_forward
- BbPython Online - 2022 Fall ET 574 X = CO Bing Links H Remaining Time: 1 hour, 42 minutes, 51 seconds. Question Completion Status: P Online Python - IDE, Editor, Con X Bb Take Test: ET574 Coding Final Ex bbhosted.cuny.edu/webapps/assessment/take/launch.jsp?course_assessment_id=_2271631_1&course_ic QUESTION 7 Implement the following: 1) Write a function randFive() with one parameter n. 2) randFive() create five random integers in the range (1, n) inclusive. 3) Five numbers should be stored in a list as the return value. Call the function, randFive() with the argument, 100. 5) Print the result of the function call. randFive() can generate any five numbers. Make sure to precisely match the output format below. Write your code in the ANSWER area provided below (must include comments if using code is not covered in the course). Example Output [1, 20, 9, 84, 46] For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Paragraph V Arial 0 P QUESTION 8 4 Click Save and Submit to save and…arrow_forwardLecture 7 DHTML with jQuery Lab Exercise 1 Display the text "Welcome to the world of jQuery" on clicking a button using jQuery.arrow_forwardDownloads/ E ID-21201491;name-Nuzhat Taba: X + English O localhost:8888/notebooks/Downloads/ID-21201491%3Bname-Nuzhat%20Tabassum%3B%20sec%20-%2017%3B%20CSE110%3B%20Lab%20assignment%2004.ipynb Cjupyter ID-21201491;name-Nuzhat Tabassum; sec - 17; CSE110;... Last Checkpoint: Last Tuesday at 10:45 PM (unsaved changes) Logout File Edit View Insert Cell Kernel Widgets Help Trusted Python 3 O + > Run Code ========= ===== ===== == In [7]: #to do Task 13 Write a Python program that reads 5 numbers into a list and prints the smallest and largest number and their locations in the list. [You are not allowed to use the max(), min(), sort(), sorted() functions here] Hint: You may assume the first input to be the largest value initially and the largest value's location to be 0. Similarly, you can assume the first input to be the smallest value initially and the smallest value's location to be 0. Note: You may need to be careful while printing the output. Depending on your code, you might need data…arrow_forward
- AutoSave O ff INT201 0OP_Lab8_ 2020-2 - Protected View - Saved to this PC Search Anass Alhami 困 File Home Insert Draw Design Layout References Mailings Review View Help A Share O Comments PROTECTED VIEW Be careful-files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Enable Editing Exercise 1 Write a recursive method that returns the sum of the squares of the first n positive integers. Test your method. Exercise 2 Write a recursive method that returns the sum of the first n odd positive integers. Test your method. Exercise 3 Write a recursive method that returns the sum of the first n elements of an array. Test your method. Exercise 4 Write a recursive method that returns the power x". Test your method. Exercise 5 Write a recursive Boolean method that determines whether a string is a palindrome. Test your method. Exercise 6 Write a recursive method that returns a string that contains the binary representation of a positive integer.…arrow_forwardPlease help with the 1 Python question Data File: https://docs.google.com/spreadsheets/d/1-S_xnAQXa1QCoWQt7xyvxo42XRNC1QBd/edit?usp=sharing&ouid=112107649557425878726&rtpof=true&sd=true %%capture############################################################## EXECUTE THIS CELL BEFORE YOU TO TEST YOUR SOLUTIONS ##############################################################import imp, os, syssol = imp.load_compiled("solutions", "./solutions.py")sol.get_solutions("imdb.xlsx")from nose.tools import assert_equalfrom pandas.util.testing import assert_frame_equal, assert_series_equal # Loading the dataimport pandas as pdimport numpy as np xls = pd.ExcelFile('imdb.xlsx')df = xls.parse('imdb')df_directors = xls.parse('directors')df_countries = xls.parse('countries') df = pd.merge(left=df, right=df_countries, how='inner', left_on='country_id', right_on='id') df = pd.merge(left=df, right=df_directors, how='inner', left_on='director_id',…arrow_forwardremove the value user inputted only not the key example Firstname [firstname]: John Middlename [middlename]: George Lastname [lastname]: Doe A for ADD D for DELETE Any key for END when enter 'D' lastname Firstname [firstname]: John Middlename [middlename]: George Lastname [lastname]: A for ADD D for DELETE Any key for END only the inputted will be remove not together the lastname names = {"firstname":"","middlename":"","lastname":""} choice = "A"while choice == "A" or choice == "D":print("\n\t A for ADD\n\t D for DELETE\n\t Any key for END")choice = input("\n\t Your choice: ")for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)if choice == "A":key = input("\n\t Enter key: ")value = input("\n\t Enter value: ")names.update({key:value})for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)elif choice == "D":delete_key = input("\n\t Enter key: ")names.pop(delete_key)for k,v in names.items():print("\n\t "+k.capitalize()+" ["+k+"] : "+v)else:print("\n\t…arrow_forward
- Ans p please question as code.arrow_forwardpython porogram -- What is the syntax for obtaining the index of the maximum value of A? (Hint, see documentation for numpy argmax)arrow_forwardires = 0; for indexl = 10:-2:1 for index2 = 2:2:index1 if index2 == 6 break end ires = ires + index23; end end ires = number of times (outer loop) number of times (inner loop)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning