Question: string _ 1 = str ( input ( ) ) string _ 2 = int ( input ( ) ) # Print the first letter

string_1= str(input())
string_2= int(input())
# Print the first letter of string1
print(string_1[0])
# Print the last letter of string1
print(string_1[-1])
# Print string1 back to back with no spaces in between.
print(string_1*2)
# Print the length of string1 divided by 2(rounding down to the nearest integer)
print(len(string_1)/2)
# The sum of the first and last number in string2
print(string_2[0]+ string_2[-1])
# Everything except the first and last numbers in string2
print(string_2[1:-1])
# The second through fifth numbers in string2
print(string_2[1:5])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!