4. Write a function my_make_size 10(x), where x is an array and output is the first 10 elements of x if x has more than

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

4. Write a function my_make_size 10(x), where x is an array and output is the first 10 elements of x if x has more than

Post by answerhappygod »

4 Write A Function My Make Size 10 X Where X Is An Array And Output Is The First 10 Elements Of X If X Has More Than 1
4 Write A Function My Make Size 10 X Where X Is An Array And Output Is The First 10 Elements Of X If X Has More Than 1 (21.75 KiB) Viewed 38 times
4. Write a function my_make_size 10(x), where x is an array and output is the first 10 elements of x if x has more than 10 elements, and output is the array x padded with enough zeros to make it length 10 if x has less than 10 elements.
5. Can you write my_make_size 10 without using if-statements (i.e., using only logical and array operations)? 6. Write a function my_letter_grader(percent), where grade is the string 'A+' if percent is greater than 97, 'A' if percent is greater than 93, 'A-'if percent is greater than 90, 'B+' if percent is greater than 87, 'B' if percent is greater than 83, 'B-' if percent is greater than 80, 'C+' if percent is greater than 77, 'C' if percent is greater than 73, 'C-'if percent is greater than 70, 'D+' if percent is greater than 67, 'D' if percent is greater than 63, 'D-' if percent is greater than 60, and 'F' for any percent less than 60. Grades exactly on the division should be included in the higher grade category.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply