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>
Alice has twice as many pencils as Cara. Leon has three more pencils than Alice. The three children have a total of 58 pencils.
<h3>
What are the no. of pencils?</h3>
The no. of pencils are there totally as the 11.
Read more about the basic maths:
brainly.com/question/19493296
#SPJ1
Answer:
Explanation:
The original Xbox: November 15, 2001
The original PS1: December 1, 1994
Xbox 360: November 22, 2005
Ps2: March 4, 2000
Ps3: November 11, 2006
Xbox One: November 22, 2013
Ps4: November 15, 2013
Nintendo Ds: November 21, 2004
Nintendo 3ds: February 26, 2011
Gameboy: April 21, 1989
Nintendo Switch: March 3, 2017