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
bonufazy [111]
3 years ago
15

Assign decoded_tweet with user_tweet, replacing any occurrence of 'TTYL' with 'talk to you later'.Sample output with input: 'Got

ta go. I will TTYL.'Gotta go. I will talk to you later.code given:user_tweet = input()decoded_tweet = ''' Your solution goes here '''print(decoded_tweet)

Computers and Technology
1 answer:
BabaBlast [244]3 years ago
5 0

Answer:

Here is the Python program:

user_tweet = input()

decoded_tweet = user_tweet.replace('TTYL', 'talk to you later')

print(decoded_tweet)

Explanation:

The program works as follows:

Suppose the input is:    'Gotta go. I will TTYL'

This is stored in user_tweet. So

user_tweet = 'Gotta go. I will TTYL'

The statement: user_tweet.replace('TTYL', 'talk to you later')  uses replace() method which is used to replace a specified string i.e. TTYL with another specified string i.e. talk to you later in the string stored in user_tweet.

The first argument of this method replace() is the string or phrase that is to be replaced and the second argument is the string or phrase that is to replace that specified string in first argument.

So this new string is assigned to decoded_tweet, after replacing 'TTYL' with 'talk to you later' in user_tweet.

So the print statement print(decoded_tweet) displays that new string.

Hence the output is:

Gotta go. I will talk to you later.

You might be interested in
Which manufacturing industry makes semiconductors that are used in a variety of systems?
aleksley [76]
Transportation equipment
7 0
3 years ago
You're going to be mowing lawns as a summer job. How long will it take for your
ahrayia [7]
Hshshshhshshs 3. 4 hours
8 0
3 years ago
Bloodborne pathogens travel by way of blood cells and can only be spread by person-to-person contact with infected blood
Eva8 [605]
That is incorrect. It is only contagious if blood is injected into person who is not infected.
5 0
3 years ago
Read 2 more answers
If one employee is assigned to a project and each project has only one employee working on it, there is a(n) ____ relationship b
Len [333]

Answer:

One-to-one is the answer because there is one project and one employee working on one project.

5 0
3 years ago
Write 3 functions in the starter code below such that: add_to_dict(): takes a dictionary, a key, a value and adds the key,value
shepuryov [24]

Answer:

Required code is given below:

Explanation:

def add_to_dict(dictt, key,value):

if key in dictt.keys():

print("Error. Key already exists.")

else:

dictt[key]=value

return dictt

def remove_from_dict(dictt,key):

try:

dictt[key]

dictt.pop(key, None)

return dictt

except KeyError:

print("No such key exists in the dictionary.")

def find_key(dictt,key):

try:

value=dictt[key]

print("Value: ", value)

except KeyError:

print("Key not found.")

4 0
3 years ago
Other questions:
  • What products use fabric manipulation
    8·1 answer
  • Many people use Wikipedia as a reference for computing papers, and getting additional information about a topic. How reliable is
    15·1 answer
  • How do you optimize a website using JavaScript?
    10·1 answer
  • the list of available fonts in the fonts gallery may differ, depending on what fonts you have installed and the type of printer
    14·1 answer
  • Which tag defines the visible content of a web document?
    10·1 answer
  • Why is printer an output device​
    14·2 answers
  • Describe the following types of Cloud services:
    11·1 answer
  • 17.8.1: Writing a recursive math function. Write code to complete raise_to_power(). Note: This example is for practicing recursi
    10·1 answer
  • Construct a SQL query that displays a list of colleges, their sity/state, the accrediting agency, and whether or not the school
    8·1 answer
  • With which type of satellite is there a propagation delay?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!