Computers and Technology

A) join During the last assignment you made a function that echoed a string several times with a separator between each repetition Here we will achieve a similar goal through the use of the joint method of the str dass When Join() is called on a str object (let's call it separator) with a list as its argument, it joins the elements of the list separating each one by Separator Below we define a a list wy_list Use the join() method on the string you define as separator" to join the elements in my list separated by the character Save the output to a new variable called foined_string The output should look as follows: "Python is so much fun! In [ ]: # This variable provided for you my_list - ['Python', 'is', 'o', 'much', 'fun) # YOUR COOE MERE raise Not ImplementedError() In [ ]: assert Isinstance(Joined_string, str) assert joined string -- "Python is so much fun! B) replace Now try to use the replace method to update the string statement such that it replaces UCLA to UCSO If you are unsure how use replace you can run str. replace to look at documentation, Note that using replace retums a new string that you need to assign to a variable if you want to keep a reference to replace is not implace") For this question, overwrite statement as the assignment to the output of the replace call In [ 1 # This code provided for you statement - UCLA is the best UC in Southern California # YOUR CODE HERE raise Not ImplementedError() In [ ]: assert Isinstance(statement, str) assert statement UCSD is the best UC in Southern California."
C) replace for dropping characters Use the replace method to remove all the exclamation polnts in the string excessive Assign the output of doing this to a variable called Fixed Hint, you can drop characters with replace by replacing them with an empty string In [ ]: This variable provided for you excessive - using exclamation point is the best 111111 • YOUR CODE HERE raise NotImplementedError() In [ 1 assert isinstance(fixed, ste) assert fixed using excessive exclamation points is the best!
D) Clearing all punctuation with replace Now we want to generalize what we did in 'cy to remove al punctuation using the replace() method Write a Por loop to loop over every character in string punctuation inside the loop. call replace on too much with the current punctuation character to remove it, like we did in 'cy To do this, inside the loop, re-assign too_much to be the output of calling replace on too much so that you are replacing too much with its updated version every time. In 1: This variable provided for you too much 1, think that punctuation... may be the bes$$$t thing that has ever been invented111111 # YOUR COOE MERE raise Not ImplementedError() In ( 1: assert isinstance(too much, str) assert too much I think that punctuation may be the best thing that has ever been invented

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:40, malibu777
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
image
Computers and Technology, 22.06.2019 17:00, bnvghnbbb
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, Nason156
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
image
Computers and Technology, 23.06.2019 09:00, Riddledjam44623
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
Do you know the correct answer?
A) join During the last assignment you made a function that echoed a string several times with a sep...

Questions in other subjects:

Konu
Social Studies, 24.09.2021 18:10
Konu
English, 24.09.2021 18:10
Konu
Mathematics, 24.09.2021 18:10