Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I write Python Code for the following? # Input data num _ list = [ - 1 , 2 3 , 4 5

How do I write Python Code for the following?
# Input data
num_list =[-1,23,45,1_00.12,-23.0,45,-111.23,28.34,-0.00001,99]
# Write a list comprehension to take the absolute value of num_list
# call the new list
# Write a list comprehension to take the reciprocal of num_list
# call the new list
# Write a list comprehension to convert the numbers into integers
# call the new list
# Write a for loop, that returns the square roots of the positive numbers in num_list
# store the results in
#===========================================================================================
# input data
list_A =['Alien','adams','Eric','Dad','French','johnson', 'floyd','Stacy']
list_B =[1,11,21,33,99,45,8,2]
# Write a list comprehension to capitalize the first letter of each element in list_A,
# store results in
# Write list comprehension to drop the last character in each element of list_A
# store results in
# Write a list comprehension to combine the corresponding elements of list_A and list_B
# Do not change the order in the lists
# For the new elements, the first part comes from list_A, rest from list_B.
# Store your results in
# Write a for loop that does the same thing as in the previous step, with one difference
# All strings must be in upper case.
# Store the results in list_for

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: 3

blur-text-image

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

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions