![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Python please
![(1) Prom t the user to enter
Ex:
Ex
Enter
we'll continue
quest in space. there will be none shuttle flights and more shuttle creWS and,
more volunteers, more civilians, more teachers
Space. nothing ends here; OUr
and our journeys continue!
ſou entered: we'll continue our quest in
Dace. there will
shuttle crews and, yes; more volunteers, more civilians
ends here; our hopes and our journeys continuel
ME
V
Ex:
(2) Implement the print menu() function to print the following command menu
MENU
Ex:
sample text:
Replace punctuation
Shorten spaces
Uit
(3) Implement the executa man nu() function that takes
parameters: a character representing
the user's choice and the user provided sample text._ execute menu() performs the meru
options, according to the user's choice, by calling the appropriate functions described below. (
lumber of non whitespace characters
Number of words
ix capitalization
the main program, call print menu() and prompt for the user's choice of menu options for
analyzing/editing the string Each option is represented by a single character.
If an invalid character is entered, continue to prompt for a valid choice. when
valid option is
entered, execute the option by calling execute. menu(). Then, print the menu and prompt for a
new option. Continue until the user enters 'q'. Hint. implement Quit before implementing other
options. (1 pt)
Choose an option:
Number of non-
Number of words
ix capitalization
Replace
Shorten spaces
MENU
Ex:
string of their choosing. Stone the text in
unctuation
plement the
of
NON
get NUM
characters () has a string parameter and returns the
characters in the string, excluding all whitespace. Call get
execute menu() function, and then output the returned value. (4 pts)
Quit
Ex:
Number of non-whites pace characters
Number of words
ix capitalization
Replace punctuation
Shorten
▪hitespace characters
returns
Ex
hoose an option:
Number of non whites pace characters: 181
Enter a sample text:
we'll continue our quest in space. there will be More shuttle flights and more shuttle crews and,
yes; more volunteers, more civilians
more teachers in space. nothing ends here: our hopes
and our journeys continue!
paces
Number of words
You entered: we'll continue our quest in space. there will be more shuttle flights and more
shuttle crews
more volunteers, more civilians, more teachers in space. nothing
ends here; our hopes and our journeys continuel
(6) Implement the get
and
returns the number of words
for the last word in a sentence. Call get
then output the returned value. (3 pts)
aracte
=
MWO ords () function. get
the string-
Punctuation replaced
exclamation
COUnt:
tring
More e shuttle flights and more
More teachers in space. nothing
function.
semicolon COUnt:
Edited text: we'll continue our ques
crews and,
More volunteers
utput the string-
and our journeys Continue.
Implement the fix capitalization() function. fix capitalization() has
string parameter and
updated string, where lowercase letters at the beginning of sentences are replaced
with uppercase letters. fix capitalization() also returns the number of letters that have been
capitalization() in the execute menu() function, and then output the num
of lellers capitalized followed by the ediled sting-
1. Look up and use Pytron fonctions
.is/owerd
uppend to complete this task. Hōnt 2: Create an empty string and use string
concatenation to ake edits to the string. (3 pts)
capitalized. Call fix
space. There will
nur
ber of
characters() in the
More civilians
um_of_words() has a string pa
end voren a space
reached except
words() in the execute menu() function, and
Number of letters capitalized:
Edited text: We'll continue OUr quest
More shuttle flights and More
shuttle crews and,
more volunteers, more civilians, more teachers
space. Nothing
ends here;
and our journeys Continuel
(8) Implement the replace punctuation() function. replace punctuation() has a string parameter
and two keyword arg Ument parameters exclamation COUnt and semicolon COLnt
replace punctuation() updates the string by replacing each exclamation point (1) character with
period (-) and each
emicolon (;) character with a comma (₂). replace punctuation() also counts
the number of times each character is replaced and outputs those counts. Lastly,
replace punctuation()) returns the updated string. Call replace punctuation() in the
execute. menu() function, and then output the edited string. (3 pts)
ameter
ber
space. there will be more S iuttle flights and More shuttle
more teachers
space. nothing ends here,
(9) Implement the shorten space() function. shorten
pace() has a string parameter and
updates the string by replacing all sequences of 2 or more
with a single space.
shorten space() returns the string. Call shorten space() in the execute _menu() function, and
then output the edited string. Hint- Look up and use Python function isspaced. (3 pt)](https://content.bartleby.com/qna-images/question/59491c6e-91a5-4fb5-8e7e-dce2244c96d7/c52b7b2a-d5c3-4268-8f54-08abb4a0e26e/qsfjlyo_thumbnail.jpeg)
Transcribed Image Text:(1) Prom t the user to enter
Ex:
Ex
Enter
we'll continue
quest in space. there will be none shuttle flights and more shuttle creWS and,
more volunteers, more civilians, more teachers
Space. nothing ends here; OUr
and our journeys continue!
ſou entered: we'll continue our quest in
Dace. there will
shuttle crews and, yes; more volunteers, more civilians
ends here; our hopes and our journeys continuel
ME
V
Ex:
(2) Implement the print menu() function to print the following command menu
MENU
Ex:
sample text:
Replace punctuation
Shorten spaces
Uit
(3) Implement the executa man nu() function that takes
parameters: a character representing
the user's choice and the user provided sample text._ execute menu() performs the meru
options, according to the user's choice, by calling the appropriate functions described below. (
lumber of non whitespace characters
Number of words
ix capitalization
the main program, call print menu() and prompt for the user's choice of menu options for
analyzing/editing the string Each option is represented by a single character.
If an invalid character is entered, continue to prompt for a valid choice. when
valid option is
entered, execute the option by calling execute. menu(). Then, print the menu and prompt for a
new option. Continue until the user enters 'q'. Hint. implement Quit before implementing other
options. (1 pt)
Choose an option:
Number of non-
Number of words
ix capitalization
Replace
Shorten spaces
MENU
Ex:
string of their choosing. Stone the text in
unctuation
plement the
of
NON
get NUM
characters () has a string parameter and returns the
characters in the string, excluding all whitespace. Call get
execute menu() function, and then output the returned value. (4 pts)
Quit
Ex:
Number of non-whites pace characters
Number of words
ix capitalization
Replace punctuation
Shorten
▪hitespace characters
returns
Ex
hoose an option:
Number of non whites pace characters: 181
Enter a sample text:
we'll continue our quest in space. there will be More shuttle flights and more shuttle crews and,
yes; more volunteers, more civilians
more teachers in space. nothing ends here: our hopes
and our journeys continue!
paces
Number of words
You entered: we'll continue our quest in space. there will be more shuttle flights and more
shuttle crews
more volunteers, more civilians, more teachers in space. nothing
ends here; our hopes and our journeys continuel
(6) Implement the get
and
returns the number of words
for the last word in a sentence. Call get
then output the returned value. (3 pts)
aracte
=
MWO ords () function. get
the string-
Punctuation replaced
exclamation
COUnt:
tring
More e shuttle flights and more
More teachers in space. nothing
function.
semicolon COUnt:
Edited text: we'll continue our ques
crews and,
More volunteers
utput the string-
and our journeys Continue.
Implement the fix capitalization() function. fix capitalization() has
string parameter and
updated string, where lowercase letters at the beginning of sentences are replaced
with uppercase letters. fix capitalization() also returns the number of letters that have been
capitalization() in the execute menu() function, and then output the num
of lellers capitalized followed by the ediled sting-
1. Look up and use Pytron fonctions
.is/owerd
uppend to complete this task. Hōnt 2: Create an empty string and use string
concatenation to ake edits to the string. (3 pts)
capitalized. Call fix
space. There will
nur
ber of
characters() in the
More civilians
um_of_words() has a string pa
end voren a space
reached except
words() in the execute menu() function, and
Number of letters capitalized:
Edited text: We'll continue OUr quest
More shuttle flights and More
shuttle crews and,
more volunteers, more civilians, more teachers
space. Nothing
ends here;
and our journeys Continuel
(8) Implement the replace punctuation() function. replace punctuation() has a string parameter
and two keyword arg Ument parameters exclamation COUnt and semicolon COLnt
replace punctuation() updates the string by replacing each exclamation point (1) character with
period (-) and each
emicolon (;) character with a comma (₂). replace punctuation() also counts
the number of times each character is replaced and outputs those counts. Lastly,
replace punctuation()) returns the updated string. Call replace punctuation() in the
execute. menu() function, and then output the edited string. (3 pts)
ameter
ber
space. there will be more S iuttle flights and More shuttle
more teachers
space. nothing ends here,
(9) Implement the shorten space() function. shorten
pace() has a string parameter and
updates the string by replacing all sequences of 2 or more
with a single space.
shorten space() returns the string. Call shorten space() in the execute _menu() function, and
then output the edited string. Hint- Look up and use Python function isspaced. (3 pt)
Expert Solution
![Check Mark](/static/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 2 images
![Blurred answer](/static/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- defin Terms : form criticism, source criticism, canonical criticism, Textus Receptus, textual variant, versionarrow_forwardplease demonstrate in vs code and send screenshotsarrow_forwardC Programming Could you write the code in C programming. I need help with 5(a,b,and c) Please upload your own work! Here are some information you may need. #define SPACE ' ' #define ROW 8#define COL 8 Thank you.arrow_forward
- C Programming. Could you update my code using the code I provided. I need help with 6. #include <stdio.h>#include <stdlib.h> #define TRUE 1#define FALSE 0#define NAME 20#define ROW 8#define COL 8#define SPACE ' '#define PLAYER_X 1#define PLAYER_O 2#define ZERO 0#define ONE 1#define TWO 2#define FOUR 4#define INVALID -1 // function prototypesvoid welcomeScreen ();void displayExplicitBoard();void clearScreen();void playGame(); // main functionint main(){ // call function welcomeScreen welcomeScreen(); // call function clearScreen clearScreen(); // call function displayExplicitBoard// displayExplicitBoard(); // call function playGame playGame(); // program executed successfully return 0;} // welcomeScreen function displays the Othello logo and rules of the gamevoid welcomeScreen (){ printf ("\t\t OOOO TTTTTT HH HH EEEEEE LL LL OOOO \n"); printf ("\t\tOO OO TT HH HH EE LL LL OO OO \n"); printf ("\t\tOO…arrow_forwardA list of any three programming languages that are often utilised in the development of web-based applications should be provided.arrow_forward61arrow_forward
- 215 Final Fall 2021 Dr. Scheiman 3) Given the state table, draw the state diagram Present (t) in Next (t+1) out A B y 1. 0. 0 0 1. 1 0 0 ! 0 0 0 1 1 1 1 1 0O State diagram SO S1 $3 $2 Page 1 3arrow_forwardCan you please advise me as to how you would structure the code? Regardsarrow_forwardFunction written in JavaScript Please thanks! Function 1: Password Checkerfunction _one(pwd)Create a JavaScript function that meets the following requirements:• Is passed a string representing a potential password• The function determines if the password meets the following requirementso The length of the password is between 8 – 12 characterso Contains at least 1 number (numeric character)o Contains at least 1 special character▪ Special characters are punctuation characters that are present on standard keyboard namely any character encapsulated within the following double quotes“(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~)”o Contains at least 1 capital letter• The function should NOT employ the use of regular expressions to solve the problem• The function also displays the result (console log) of its password validation as illustrated below.• The function returns a Boolean back to the caller indicating valid or not.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education