Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***PYTHON**** (1) Ask the user for a string, then ask for the start and end slice. The string will be one input and then start

***PYTHON****

(1) Ask the user for a string, then ask for the start and end slice. The string will be one input and then start and end slice will be separated by a comma. (1 pt)

Enter a string: This is a sample string Enter a start, end separated by a comma eg 1, -2: 5, 10 

(2) Split the string given for the start and end slice and make convert them to integers. Output the start and end slice values on separate lines, then output the original string with that start and end slice. (2 pts).

The start value is : 5 The end value is : 10 The value of 'This is a sample string'[5:10] is 'is a ' 

(3) Output the

results of Capitalize.

number of n's.

'It ends with an !' if the last character is a !, otherwise output 'It does not end with a !'.

index of the first space,

index of the second space.

string lowered

string uppered

the results of replacing all the e's with 3's.

The string title cased.

Capitalized : This is a sample string There are 1 n's. It does not end with a ! The first space is at index : 4 The second space is at index : 7 Lower cased : this is a sample string Upper cased : THIS IS A SAMPLE STRING In leet speak it is : This is a sampl3 string With title it is : This Is A Sample String

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions

Question

LO2 Compare three types of individual incentives.

Answered: 1 week ago