1. Write a python function called calculateSum that takes two integer arrays of the same length and calculates the sum array (by adding elements in the same index).
Sample
Arguments: [2, 5, 6, 5]. 7,3, 3, 2]
Function wll return: (9, 8, 9, 7]
3. Write a python function called removePunctuation that takes as an argument a string. representing a sentence and returns a copy of the string with all punctuation removed.
Sample:
Argument: "Hello?! Let's try to solve this exercise, it will be easy :)!"
The function will return: Hello Lets try to solve this exercise it will be easy (Hint: You may use string built-in functions: isalnum) to check for every character if the character is alphanumeric (letter or digit) and isspace) to check if it is a space. Remove any character that is neither an alphanumeric, nor a space)
2. Write a python function called upperLower that takes a string as an argument and returns: the number of uppercase letters, the number of lowercase letters and the positive difference between those two.
Sample:
Argument: ThiS iS A SamPle sentENCE.
The function will return: (9, 12, 3)
Explanation of result: There are 9 Upper case letters, 12 Lower case letters and the positive difference is 3. (Hint: Use string built-in functions isupper) and islower0 to check if a letter is uppercase or lowercase)
1. Write a python function called calculateSum that takes two integer arrays of the same length and calculates the sum array (by adding elements in the same index).
Sample:
Arguments: [2, 5, 6, 5]. [7, 3, 3, 2]
Function will return: (9, 8, 9, 71
1- Write a program that stores five names in an array of string. It gets a name from the user & displays whether the name is present in the array or not
Write a C++ program in which, read three c-string str, pat and rpat from user. Now your task is to find pat in str, replace pat with rpat in str if pat is found else display a message pat not found. Example 1 Example 2 Example 3 Example 4 Input: Str: abcdefabcdkuiyh Pat: abcd Rpat: xyz Output: After replace: Str: xyzefxyzkuiyh Input: Str: abcdefabcdkuiyh Pat: ab Rpat: xyz Output: After replace: Str: xyzcdefxyzcdkuiyh Input: Str: abcdefabcdkuiyh Pat: abc Rpat: xyz Output: After replace: Str: xyzdefxyzdkuiyh Input: Str: abcdefabcdkuiyh Pat: abcdefg Rpat: xyz Output: Pat not found Str: abcdefabcdkuiy
Display record of all the students greater than X marks in final exam (in ascending order with respect to marks obtained in final exam). The value of X will be entered by the user.
Question Link: https://ibb.co/znddDcF
Part 1 Question Link: https://ibb.co/swzRK4w
Part 2 Question Link: https://ibb.co/P9WnMC0
Q: Write the Algorithm of Binary Search using binary search tree. Explain with example .