Python Forum
Intro to Python for Data Science with Datacamp
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intro to Python for Data Science with Datacamp
#2
The code you've written implies that you already know the answer. But you want to write code that can figure out the answer independent of your knowledge. Do you know how to get your code to print out "11.25" using only print, areas, and a number to indicate the index? e.g. you need to print the second element, and this would print the first
print(areas[0])
As for the third exercise - it really depends on how advanced your Python is. You might want to iterate over the indexes, find "living room" and then add one to that index to get what you really want.

If you still have trouble, post back your new code and we can try to help you more form ther e :)
Reply


Messages In This Thread
RE: Intro to Python for Data Science with Datacamp - by micseydel - Aug-15-2018, 11:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Star Interesting Intro to python problem I can't solve. Honestworker 5 12,518 Mar-04-2021, 02:05 AM
Last Post: BashBedlam
  Intro python using lists Rustypotatoes 2 3,920 Sep-17-2020, 08:30 PM
Last Post: jefsummers
  Python Assignment 3 - Applied Data Science - 2.3 eyavuz21 8 5,095 Jun-06-2020, 08:59 AM
Last Post: eyavuz21
  Applied Data Science with Python - homework 2.2 (Weather plotting) eyavuz21 4 3,456 Jun-03-2020, 07:09 PM
Last Post: eyavuz21
  Foundations of Data Science Data 8.2x tryingtolearnpython 2 3,706 Jul-23-2018, 02:48 AM
Last Post: tryingtolearnpython
  Question code from datacamp I don't understand fad3r 3 3,997 Feb-04-2018, 08:44 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020