Answer:
The program is as follows:
word = input("Enter a word: ")
if word:
if len(word) <= 4:
word = word[::-1]
else:
word = word[0]+word[1]+word[-2]+word[-1]
print(word)
else:
print('empty!')
Explanation:
This gets input for word from the user
word = input("Enter a word: ")
If input is not empty
if word:
This checks if the length is less than or equal to 4 characters
if len(word) <= 4:
If yes, this reverses the word
word = word[::-1]
If otherwise,
else:
This gets the first, second, second to last two characters
word = word[0]+word[1]+word[-2]+word[-1]
Print the new string
print(word)
Print empty, if input is empty
<em>else:
</em>
<em> print('empty!')</em>
Answer:
Artificial Intelligence.
Automated personal digital assistant.
THz frequencies for Communications (5G & 6G)
Blockchain.
Virtual reality and augmented reality.
Internet of Things (IoT)
Visible light communication.
LTE.
Explanation:
Answer:
A: used by ISP's to filter out email SPAM
C: a way to help an individual focus on best choices when deciding what to watch or buy.
Explanation:
Collaborative filtering uses a community-based approach to filter spam. It works by collecting numerous email users from around the world. By doing this, it becomes possible for users to flag emails that are spam and those that are legitimate.
Also Collaborative Filtering is one of the most efficient techniques for building a system that can help a user when it comes to recommending best choices based on information from a large number of users.
Answer:
how many event you have been too in the last month (well non during this time but as an example)
Explanation:
Answer:
6 2 and 0
Explanation:
This algorithm doesn't work if the list is not ordered ascending.
In this example it is not, and indeed the item "1" is never found.
first cycle: first=0, last=12 so midpoint=6
second cycle: first=0, last=5 so midpoint=2
last cycle: first=0, last=1 so midpoint=0
then last is assigned -1 so the while statement is no longer true.