Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Evaluation Question 1: Write a piece of Python code that finds the acronym of a set of words or values, which are supplied as elements

image text in transcribed
Evaluation Question 1: Write a piece of Python code that finds the acronym of a set of words or values, which are supplied as elements of a list. For example, the list ["Middle". "East", "Technical "University') should yield 'METU'. Also, it should work for other datatypes too. For example: ["Sad", "But". True, 1996) should yield 'SBT1. Notice True is a boolean and 1996 is an integer. You do not have to take input from user for this question, you can just define a list yourself. Do not write a function for this question! Evaluation Question 2: Write a piece of Python code that forms a string out of the integer elements of a list based on their values. It will add even numbers add the beginning of the string and odd numbers at the end. For example, 11. 2. 3. 4 should be transformed into '4213' or 12.3.5.1.6) should be transformed into '62351'. You can assume that the lists are not nested. You do not have to take input from user for this question, you can just define a list yourself. Do not write a function for this question! Do not use insert for this question. Evaluation Question 3: Write a descriptive length function quiz_length() that calculates the length of a list in a different way: The length of a list is the sum of the number of characters and digits that are possessed by the elements of the list. For example, the list 12. 0. "ab") has the length 5 since 12 has two digits. O has one digit and "ab" has two characters. The function should return integer value for the given ist. For example, after Implementing the function and running following code, sample_value should be equal to 5: L-120"ab") sample volue - quiz Jength(1)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

ISBN: 321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago