
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
Question
Note:
I need this in Drracket(racket).
Write a function that takes a list containing characters and numbers as input (in random orders) and displays as output a string containing the character and a list containing the numbers, e.g., given the lists ‘("h" 1 2 3 "e" "l" 4 5 "l" "o"), your method should output: "hello" and '(1 2 3 4 5 6). Please make sure to test your function and to explain how your code works.

Transcribed Image Text:SOB 35 – (Block 2 – material covered in Week 13)
Write a function that takes a list containing characters and numbers as input (in random orders)
and displays as output a string containing the character and a list containing the numbers, e.g.,
given the lists '("h" 1 2 3 "e" "I" 4 5 "I" "o"), your method should output: "hello" and '(1 2 3 4 5
6). Please make sure to test your function and to explain how your code works.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images

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
- Implement in python please Write a function named "sort_word" that declares a parameter for a word and returns a string with the characters from the original word in sorted order. Hint: use the built-in Python sorted() function to convert the string into a sorted list of characters, and then use a for loop to convert the list back into a string. For example, given the word "tea", you would translate it into the String "aet". and return it.arrow_forwardA user is going to enter numbers one at a time, entering 'q' when finished. Put the numbers in a list, sort it in numerical order, and print out the list. Then print out the middle element of the list. (If the list has an even number of elements, print the one just after the middle.) Remember that a list 1st of numbers can be sorted numerically by calling 1st.sort(), and can be printed with print(1st). You can assume that every entry is either a valid integer or is the letter 'q'. Examples: If the input is 4 3 6 7 3 q The output is [3, 3, 4, 6, 7] 4 If input is 4 3 6 7 3 2 q The output is [2, 3, 3, 4, 6, 7] 4arrow_forwardWritten in python with docstrings if applicable. Thanksarrow_forward
- Write a Python program including the following: a. A function that receives a list of strings as a parameter, eliminates the following stop words, and returns the resulting list: Stop words: a, an,the, punctuation symbols (.,;: ?, etc.) e.g. Original list: ["There", "is", "a", "little", "dog", "in", "the", "University", ".", "The", "little", "cat", "saw", "the", "dog", "in", "the", "University", "."] Resulting list: ["There", "is", "little", "dog", "in", "University", "little", "cat", "saw", "dog", "in", "University"]arrow_forwardWrite a program that does two string functions: capitalize the first word of a phrase, and reverse the letters of words in odd positions within the phrase. For this program it is acceptable to let punctuation be part of the word. Write a capitalizeWords() and a reverseOddWords() method and call them in a test program. Make certain to properly handle empty phrases, phrases with one and two words, and phrases with greater than two words. For example, if the original phrase were: Learning Java is fun! Java is powerful and easy to use The capitalized version would be: Learning Java Is Fun! Java Is Powerful And Easy To Use And with reversed odd words would be: gninraeL Java sI Fun! avaJ Is lufrewoP And ysaE To esUarrow_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

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education