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
Sunny_sXe [5.5K]
3 years ago
7

Write a python program stored in file extra_credit.py that takes three different inputs from the user where : First Input: The p

rogram takes a sentence as input from the user. Second Input: The program takes individual words separated by whitespace as input. Third Input: The program takes a single special character as input.
Computers and Technology
1 answer:
LUCKY_DIMON [66]3 years ago
4 0

Answer:

Check the explanation

Explanation:

print("************************************************************")

sentence = input("Enter a sentence : ").split()

replace_words = input("\nEnter the words that should be replaced : ").split()

special = input("\nEnter the replacing special Character : ")

result = []

for word in sentence:

   if word not in replace_words:

       result.append(word)

   else:

       result.append(special * len(word))

result = ' '.join(result)

print("\nThe Sentence with words censored is : " + result)

print("************************************************************")

You might be interested in
Create a loop that will output all the multiples of 5 that are greater than zero and less than 60 (do not include 60). 5, 10, 15
DiKsa [7]

Answer:

Explanation:

Let's do this in python

(a) Between 5 and 60 and divisible by 5

for i in range(5, 60/5):

    print(5*i)

(b) Less than 200 and divisible and 2 and 7

for i in range(1, int(200/14) + 1):

    print(14*i)

(c)Sum of multiple of 8 that are between 100 and 500

sum_result = 0

for i in range(100, 500):

    if i % 8 == 0:

         sum_result += i

print(sum_result)

(d)sum of all odd numbers between 20 and 10

sum_odd = 0

for i in range(10, 20):

    if i % 2 == 1:

         sum_odd += i

print(sum_odd)

3 0
3 years ago
Is it true or false for this question?
Lana71 [14]
Your correct I think I’m not sure
7 0
3 years ago
Which line of code will only allow a non-decimal point to be stored in a variable? candyCost = float(input("How much is the cand
ad-work [718]

Answer:

candyCost = int(input("How much is the candy?"))

Explanation:

candyCost = input("How much is the candy?") → By default, this how you get input and store the value. And it is stored as a string

candyCost = str(input("How much is the candy?")) → This also gives you a string to store

candyCost = float(input("How much is the candy?")) → This gives you a float number, decimal number, to store

candyCost = int(input("How much is the candy?")) → This gives you an integer number, a non-decimal

4 0
3 years ago
Read 2 more answers
a 0.600 kg dynamics trolley has 1.5 kg load added. It is launched with a force of 10.n what is the acceleration
Anastaziya [24]

Answer:

acceleration = 4.76 m/s²

Explanation:

Given that"

the mass of the dynamic trolley = 0.6 kg

the mass of the load  = 1.5 kg

total mass = (0.6 + 1.5) kg = 2.1 kg

the force = 10 N

Thus;

using the formula of force which is;

Force = mass × acceleration

10 = 2.1  × acceleration

acceleration = 10/2.1

acceleration = 4.76 m/s²

7 0
3 years ago
Which routine is configured to execute first when the program runs?
tester [92]
It's D because of ok
4 0
3 years ago
Other questions:
  • What policy definition can help remind employees in the User Domain about what constitutes suitable use and improper use of corp
    14·1 answer
  • Which one of the following is not the name of a 20th century school composition
    14·2 answers
  • What means can a worm use to access remote systems to propagate?
    7·1 answer
  • The set of rules for how computers talk to one another
    6·1 answer
  • To what would you compare the transport layer?
    14·1 answer
  • Write a program named ArrayDemo that stores an array of 10 integers. (Note that the array is created for you and does not need t
    14·1 answer
  • Lets computer know what to do when it starts up...
    9·1 answer
  • What is the first step you should take when you want to open a savings account make your initial deposit go to the bank and fill
    9·1 answer
  • My laptop volume has got really low all of a sudden. It wasn't the best to start with but now i can barely even hear it at 100%.
    10·1 answer
  • What kind of charger can i use for this
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!