1. Engineering
  2. Computer Science
  3. implement the function returnno that takes a string s and...

Question: implement the function returnno that takes a string s and...

Question details

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

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution