Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For your solutions, only use the concepts taught in this class so far. Start your code with three comment lines explaining what your program does,
For your solutions, only use the concepts taught in this class so far. Start your code with three comment lines explaining what your program does, your name as the author, and today's date. For your code use one file. Define and call all of the following functions. 1. Define a value-returning function that returns the longer of two strings entered as parameters. Test you function 2. Define a value-returning function countNonDigits(myString) that counts and returns the number of characters in the string that are not digits. (digits are between 'O' and '9') in the myString parameter. (see lecture slide 15 for an example.) Call the function in a print statement) three times to test it with different arguments. 3. Define a void function that prints only the non-capital letters of a string given as parameter, all characters in one line.print(char, end="") Use the ord() function in your solution to check if a letter is a non-capital letter. Call the function with "alpha", "Alpha" and "67Alpha##" as test arguments
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started