Question: 1 . Given list of strings, write a script to count the number of strings that the string length is 3 or more and the

1. Given list of strings, write a script to count the number of strings that the string length is 3 or more and the first and last characters are the same. For example, a list of [cbc,123,ww,abc,strings] will have a result of 2(cbc and strings).
2. Given a list of numbers, i.e.,[23,45,12,123,98,76], write a script to find the largest number and its position in the list. It would be the 4th element and the value is 123 in the example above.
3. Given a list of numbers of strings, find whether there are two or more numbers/strings match (having the same value). For example, [12,34,56,78] has no match while ["GIS", "script", "Programming", "Python", "GIS"] has a match.
4.(Optional) We have 18 students in the class, simulate the chance that there are students with the same birthday (the same day, not the year) assuming 365 days a year. this is an expansion of #3.(Hint: 1) generating 18 random numbers in the range between 1 and 365 and find if there is a match; 2) repeating the process many times (the more times you repeat, the more accurate your result is) and count how many times there is a match.

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!