Question

In: Computer Science

Your data science experiment now requires four additional data tasks. The first task is to use...

Your data science experiment now requires four additional data tasks. The first task is to use the list append method to add to the list variable named btcdec1 the BTC price of 14560. The second task is to create a new list with a variable named btcdec2 and append the btc prices of 15630, 12475, and 14972. The third task required you to use the list extend method to add the contents of the list in variable name btcdec2 into the variable name btcdec1. The fourth and final task requires you to use the list sort method in the list named btcdec1 to sort the items in the newly extended list, then use the print statement to output the content of list btcdec1 into the Python console.

Solutions

Expert Solution

PYTHON CODE:

# creating empty btcdec1 list
btcdec1 = []

# adding the 14560 to btcdec1 list
btcdec1.append(14560)

# creating empty btcdec2 list
btcdec2 = []

# appending the 15630,12475,14972 to the btcdec2 list
btcdec2.append(15630)
btcdec2.append(12475)
btcdec2.append(14972)

# adding the contents of btcdec2 to btcdec1
btcdec1.extend(btcdec2)

# sorting the btcdec1
btcdec1.sort()

# printing the btcdec1
print(btcdec1)

SCREENSHOT FOR CODING:

SCREENSHOT FOR OUTPUT:


Related Solutions

Handling Competition among Processes in computer science. Task Scheduling and Tasks Scheduler 3. What are the...
Handling Competition among Processes in computer science. Task Scheduling and Tasks Scheduler 3. What are the Operating System (OS) functions to the computer and application software
Use the Tornadoes data. Your TASK is to use the months of July and August to...
Use the Tornadoes data. Your TASK is to use the months of July and August to predict the tornado activity in October. Answer questions 5 to 7. Choose the best fitting answer. Note: numbers are truncated unless specified. 5. If July had 100 tornadoes and August had 200 tornadoes, what would be your prediction for the number of tornadoes in October? a. 34.88 b. 39.18 c. 44.15 d. 58.62 6. What is the approximate error of this prediction? a. 8.44...
Use Word to create a task list with a minimum of 25 tasks for the project...
Use Word to create a task list with a minimum of 25 tasks for the project plan. The tasks should be in the format of verb then noun. Deliverable headings should be nouns. The list should be a complete plan to build a local area network in an office.
This task exercises your ability to use python to represent data and use flow control and...
This task exercises your ability to use python to represent data and use flow control and functions to re-organize the data. You need to submit the ipynb file to Moodle. A data scientist has collected tube information and saved the video info in multiple CSV files. Each CSV file has the following columns: ·         video_id ·         trending_date ·         title ·         channel_title ·         category_id ·         publish_time ·         tags ·         views    ·         likes      ·         dislikes ·         comment_count ·         thumbnail_link ·         comments_disabled     ·         ratings_disabled          ·         video_error_or_removed        ·         description You are asked to write python code to process CSV data...
Macco Bakers requires additional financing for a 90-day period. Four alternatives are being considered. Additional financing...
Macco Bakers requires additional financing for a 90-day period. Four alternatives are being considered. Additional financing required $ 580,000 a) Establish a line of credit with the bank. The bank will charge a fee to establish the line of credit. interest rate on line of credit 8% fee charged $ 8,000 b) Forgo trade discounts from suppliers on terms of 2/10, net 100. c) Issue commercial paper for 90 days. Discount rate on commercial paper   2.0% d) Obtain a loan...
You've made the finals of the Science Olympics! As one of your tasks, you're given 1.9...
You've made the finals of the Science Olympics! As one of your tasks, you're given 1.9 g of copper and asked to make a cylindrical wire, using all the metal, with a resistance of 1.8 Ω. Part A What length ℓ will you choose for your wire? Express your answer in meters to two significant figures. Part B What diameter d will you choose for your wire? Express your answers in millimeters to two significant figures
A task requires the completion of four activities. A teacher would like to know if differences...
A task requires the completion of four activities. A teacher would like to know if differences in the sequence of the four activities results in different task completion times. The teacher selects three students and demonstrates the activities in random order to the students. Then each student completes the task with each of the activity sequences. The completion times are recorded. The following table shows the minutes for each student to complete each task. Time (minutes) Sequence Allen Carla Henry...
Now that you have completed your readings, your task is to assess the impact of sexually...
Now that you have completed your readings, your task is to assess the impact of sexually explicit materials on human sexual behavior. You will need to analyze the following questions, presenting a 2-4 paragraph response for each question: 1. There is generally less violence in sexually oriented material than in mainstream movies and TV crime shows. Why are censorship efforts directed more toward sexually explicit nonviolent material than toward nonsexual violent material? 2. Research has found 82% of students viewing...
Now that you have completed your readings, your task is to assess the impact of sexually...
Now that you have completed your readings, your task is to assess the impact of sexually explicit materials on human sexual behavior. You will need to analyze the following questions, presenting a 2-4 paragraph response for each question: 1. There is generally less violence in sexually oriented material than in mainstream movies and TV crime shows. Why are censorship efforts directed more toward sexually explicit nonviolent material than toward nonsexual violent material? 2. Research has found 82% of students viewing...
How would your task force use the FOCUS model and the data collection, process mapping, and...
How would your task force use the FOCUS model and the data collection, process mapping, and process analysis tools to plan for a process change?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT