Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
in python3, we will give give a string sentence to the program (e.g I will laugh out laud) as an input and we will get ( i will LOL) for the output.
make a function to replace at least four different words or phrases with acronyms. like "laugh of laud" to "LOL".
Also, must not use any built-in find, replace, encode, index, or translate functions.
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 2 images
Knowledge Booster
Similar questions
- In a C program; I think the last part is whats corrupting my code. IF you could explain evrything but with emphasis on that a bit more. Thanks Implement the following algorithm as the find_gcd( ). This function will find thegreatest common divisor (that is, the product of all common factors) of integers n1and n2 . Input parameters: n1 and n2. Output parameter: p.Algorithm:Put the absolute value of n1 in q and of n2 in p .Store the remainder of q divided by p in r .while r is not zeroCopy p into q and r into p .Store the remainder of q divided by p in r .p is the gcd .arrow_forwardI have a block of Python. How do I modify it to solve this classical mechanics problem (questions are in the picture)? import matplotlib.pyplot as pltimport numpy as npimport os # This solves for x such that 1+tanh(x)=alpha *x# The program first prompts for alpha print("This find zeros of function 1+tanh(x)-alpha*x")alpha=float(input("Enter alpha: ")) # This defines a function F(x) and its derivative Fprime(x)def GetFFprime(x): F=1.0+np.tanh(x)-alpha*x Fprime=1.0/(np.cosh(x)*np.cosh(x)) -alpha return F,Fprime xguess=float(input("Guess a value of x: "))yarray=[] # Make arrays with no elementsxarray=[]xarray.append(xguess) # Add element with guess for first valueyarray.append(0.0)biggestx=xarray[0] offby=1.0E20 # used to check convergencenarray=0while offby>1.0E-7 and narray<10: yarray[narray],yprime=GetFFprime(xarray[narray]) print("x=",xarray[narray]," y=",yarray[narray]) offby=np.fabs(yarray[narray]) xarray.append(0.0) yarray.append(0.0)…arrow_forwardWrite a function countWords that accepts a single string as an argument. The function then returns adictionary that gives the frequencies of words in the string that start with a given letter. The functionshould not be case sensitive, and upper case letters counts should be returned using upper caseletters as keys. Use Python pleasearrow_forward
- How to write a function in python where it takes a list of string s. Where s= ["hello","lazyness","polite","politness"]. The function takes the string s as input and returns a string that is the longest even length string that ends with "ness". But if there is no string that ends with "ness" then an empty string is returned.arrow_forwardFor Python in IDLE. I need to add to this code. Change the program to allow the user to enter the size of the shapes before the functions are called. import turtle t = turtle.Turtle() def draw_circle(r): t.circle(r) def draw_triangle(forwd,lft): t.forward(forwd) t.left(lft) t.forward(forwd) t.left(lft) t.forward(forwd) def draw_square(length): for i in range(0,4): t.forward(length) t.right(90)draw_circle(100)draw_square(200)draw_triangle(300,120)arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY