Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

List the advantages and disadvantages of the pay programs. page 505

Answered: 1 week ago