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>
We are in the modern era and the information era
Answer:
Don't you just uninstall it?
Explanation:
Answer:
See below
Explanation:
Because sometimes you have to 'carry' a 1 over to the ext column when adding two binary numbers
Example :
1 1 1
<u>+1 1 1 </u> <==== starting in the first R column add 1 + 1 to get 0 and carry 1
then the next column you will add 1 + 1 + 1 = 1 and carry 1 again
then 1 + 1 + 1= 1 and carry 1 again (to column 4) to get
1 1 1 0