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[len(string_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(string_1/2)
# The sum of the first and last number in string2
print(string_2[0]+ string_2[])
# Everything except the first and last numbers in string2
print(string_2[])
# The second through fifth numbers in string2
print(string_2[1:6])

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Factor the given expressions completely. 36a 4 + 1

Answered: 1 week ago