Answer:
Triple-click the text in the bullet item is the easiest way to select all text
Explanation:
Answer:
Following are the program in the Python Programming Language
#set variable to input sentence to replace words
sen = input()
#split that sentence
sen = sen.split()
#set variable to input whole sentence
get = input()
#set the for loop to replace words
for i in range(0, len(sen), 2):
#check condition when words of sen is in get
if sen[i] in get:
#then, replace words
get = get.replace(sen[i], sen[i+1])
#print the whole string after replacing
print('\n',get)
Explanation:
<u>Following are the description of the program</u>.
- Set a variable 'sen' that get a sentence for replacing the word.
- Split that sentence by split() method and again store that sentence in the following variable.
- Set a variable 'get' that gets the whole sentence from the user.
- Set the for loop for replacing words then, set the if conditional statement that checks the condition that the variable 'sen' in the variable 'get' then replace the words.
- Finally, print the whole sentence after the replacement.
Answer:
Answered below
Explanation:
// Python implementation
incrementAmount = 5
basePrice = 10
price = 0
arrivalHour = int(input("Enter arrival hour 0-12: ")
if arrivalHour < 0 or arrivalHour > 12:
print ("Invalid hour")
if arrivalHour == 0:
price = basePrice
else:
price = arrivalHour * incrementAmount
totalPrice = price + basePrice
if totalPrice > 53:
totalPrice = 53
print ("Your bill is $totalPrice")