Question: Implement the function returnNO that takes a string s and an integer n as parameters and returns the first n characters of the string s.

Implement the function returnNO that takes a string s and an integer n as parameters and returns the first n characters of the string s. If the string has length less than n, then an empty string should be returned. The information below shows how you would call the function returnNO and what it would display for a few different parameters Python 3.7.0 Shell File Edit Shell Debug Options Window Help Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD6 4)] on win32 Type "copyright", "credits" or "license)" for more information. RESTART: C:/users/eve/Documents/evelyn/241/assignments/A2.py >>>returnN("Hello World!", 3) Hel >>returnN ("Hello World!", 5) Hello" >>> returnN ("Hello World!", 30) L: 11 Col: 4 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
