Question: Write a function that takes a string and an integer ( n ) as input. The program will convert the final n characters to uppercase.

Write a function that takes a string and an integer (n) as input. The program will convert the final n characters to uppercase. For example 'BallOfStrinG' with
n=6 should return 'BallOfSTRING'.
In [5]: M def string_convert(string, n):
In [6]: M assert string_convert('BallofStrinG',6)== 'BallOfSTRING'
assert string_convert('Ilovemaps',4)== 'IloveMAPS'
Write a function that takes a string and an

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 Programming Questions!