Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use PYTHON Part 3: Combining lists and loops. Question 5: Now we want you to try to use various components of everything you just learned

Use PYTHON image text in transcribed
Part 3: Combining lists and loops. Question 5: Now we want you to try to use various components of everything you just learned to calculate some values. The cell below includes two lists of values, x and y. Your task is to initialize two new empty lists, xaquared and yeubed, iterate through the lists using loops to compute x and y', and store these values in your new lists. Once you've computed all the values, print out the results. Yes, this might seem a bit complicated -- that's totally expected. After all, you're still learning to write codel If you find yourself spending too much time to figure this out, make use of Slack or try to drop by office hours or help room hours. Making sure that you spend time on your own trying to work through pre-class activities like this one are important for making your time in class as productive as possible. Hint: If you take a look at the table above that contains information about lists, you see that it mentions adding values to a list using .append (), this is what you'll want to use to fill your xsquared and yeubed lists. Also, remember that we use to compute powers in Python. So "2 cubed" would be 2**3. x - (2,4,6,8, 10,12,14,16,18] y = [10,8.25, 7.5,7,6.5,7,,5,8.25.10) ! * Put your commands for intializing your new lists below this comment * Put your loop(s) for computing x-squared and y-cubed below these comments. * You'11 be using .append( ) to add new values to the 1ists you just initialized

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

More Books

Students also viewed these Databases questions

Question

4-6 Is there a digital divide? If so, why does it matter?

Answered: 1 week ago