Question: This is for Python, Thank you very much. (1) Create a list of the first 100 triangular numbers. The triangular numbers . You should use

This is for Python, Thank you very much. (1) Create a listThis is for Python, Thank you very much.

(1) Create a list of the first 100 triangular numbers. The triangular numbers . You should use a for loop . are 1, 1+2, 1+2+3, 1+2+3+4, 1+2+3+4+5, where you explicitly calculate the addend. (2) Create a list of the first 100 pentagonal numbers. The pentagonal numbers are 1, 1+4, 1+4+7, 1+4+7+10, (3) Implement twice a function that tests whether a string is a palindrome, such as "able wasi ere i saw elba". One implementation should use the test for equality for strings, the other one should use comparison of individual characters. For the first one, you can generate the reverse string as a slice. (4) Implement a function minus (listA, listB) which returns a list of all elements in listA that are not in listB. (5) Implement a function that takes a string and replaces all consonants with a consonant+'y'+consonant combination. For example, "string" becomes "systytryrinyngyg

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!