Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
← 55 members online
 0 viewing
halkazi
Group Title
Trying Exercise 2.10 OPT.2 Part 2
Write a list comprehension which solves the equation y = x2 +1. Your solution should print out a list of [x,y] pairs; use the domain x ∈ [−5, 5] and the range y ∈ [0, 10].
My best attempt:
[(x,x*x+1) for x in range(5,5)  (x*x+1) in range(0,10)]
But does not seem to work.
Anything I am missing?
 2 years ago
 2 years ago
halkazi Group Title
Trying Exercise 2.10 OPT.2 Part 2 Write a list comprehension which solves the equation y = x2 +1. Your solution should print out a list of [x,y] pairs; use the domain x ∈ [−5, 5] and the range y ∈ [0, 10]. My best attempt: [(x,x*x+1) for x in range(5,5)  (x*x+1) in range(0,10)] But does not seem to work. Anything I am missing?
 2 years ago
 2 years ago

This Question is Closed

halkazi Group TitleBest ResponseYou've already chosen the best response.0
Got it. [(x,y)for x in range(5,5) for y in range(0,11) if y == x*x+1]
 2 years ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.