1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sergey [27]
3 years ago
9

Define a function called strip_punctuation which takes one parameter, a string which represents a word, and removes characters c

onsidered punctuation from everywhere in the word. (Hint: remember the .replace() method for strings.)punctuation_chars = ["'", '"', ",", ".", "!", ":", ";", '#', '@']
Computers and Technology
1 answer:
DaniilM [7]3 years ago
8 0

Answer:

punctuation_chars = ["'", '"', ",", ".", "!", ":", ";", '#', '@']

def strip_punctuation(strWord):

   for charPunct in punctuation_chars:

       strWord = strWord.replace(charPunct, "")

   return strWord

Explanation:

The function is defined with a single argument.

A for loop is ran to check each character of the the word.

If a punction mark is present as a character in the word, it is removed.

The same word is returned but without the punctuation marks.

You might be interested in
What is the reason that friction is present in surface to surface contact?
Andrej [43]
One surface is larger than the other surface
3 0
3 years ago
Which one of the following pieces of information would be allowed as part of a limited data set?
Inessa05 [86]
Phone number would be allowed
6 0
3 years ago
When TCP/IP translates a network layer address into a data link layer address, it sends a special ____________ to all computers
Llana [10]

Answer:

Broadcast message

Explanation:

The network models like OSI and TCP/IP suites have standard layers and protocols that governs the communication of end devices in a network.

The TCP/IP suite model has four layers which are application, transport, internet and network access layers. The network access does the work of both the data-link and physical layer of the OSI model.

When the packet is encapsulated in a data-link header and trailer, and needs to be sent to another unknown host, a broadcast message is sent to all the computers in the network to retrieve the remote host address for a unicast transmission to take place.

3 0
3 years ago
Read 2 more answers
If you have 5 bits, how high can you go in binary?
PilotLPTM [1.2K]
5 bit unsigned binary number is from 0 to (25-1) which is equal from minimum value 0 (i.e., 00000) to maximum value 31 (i.e., 11111).
4 0
3 years ago
If you were programming a robot to respond to touch, the path might look something like this:
aniked [119]

Answer:

what

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • To copy noncontiguous slides, open Slide Sorter view, click the first slide thumbnail, press and hold ____, click each additiona
    15·1 answer
  • In an is framework, ________ is the bridge between the computer side on the left and the human side on the right
    12·1 answer
  • Hybrid protocol is similar to which other protocol?
    10·1 answer
  • How do new sources of power assist in the development of inventions?
    15·1 answer
  • An IP address in the form 197.169.100.1 is called a(n) ________. dotted quad encryption key random number sequential access numb
    7·1 answer
  • What is something that can be done to help stop teen teen crashes
    8·1 answer
  • Describe any five GSM PLMN basic services?
    10·1 answer
  • One condition for deadlocks is the circular-wait condition. One way to ensure that this condition never holds is to impose a tot
    12·2 answers
  • Tina reported a safety hazard at her workplace to OSHA. Representatives from OSHA came to her work and inspected the issue, then
    14·1 answer
  • 1. (A) What do you mean by computer? Discuss the use of<br> computer in daily life.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!