1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sashaice [31]
3 years ago
15

Im trying to call the keys in a dictionary I have called "planet_dict". in order for them to be included in the for loop, the va

lues of the keys have to be within a range of
273 <= x <= 373
I understand how to do this with certain values, but idk how to call them from a dictionary.

Computers and Technology
1 answer:
zavuch27 [327]3 years ago
4 0

You can do something like this. My code iterates through the dictionary keys and then we use that key to get a value. We check if the value is between 273 and 373 and if it is, it's a water planet. My code is just a general idea of what to do. Instead of printing, you could add the key to a list and then print the contents of the list.

You might be interested in
What error occurs in the following program? #include using namespace std; int main() { int number1, number2, sum; cout &lt;&lt;
Nady [450]

Answer:

1. ‘cout’ was not declared in this scope.

2. ‘cin’ was not declared in this scope.

3. lvalue required as left operand of assignment.

Explanation:

The code gives the error cout and cin was not declare. This error means, we not include the library where they define.

cout and cin is the input/output instruction and they include in the library iostream file.

the last error is lvalue required as left operand of assignment.

lvalue means the assignable value, we actually do the wrong assignment.

number1 + number2 = sum;

here, sum is is the assignment variable. so, it must be in the right side of the '=' operator.

sum = number1 + number2 ;

Now, the above is correct. the value number1 plus number2 is assign to sum.

7 0
3 years ago
Which 2 tools are useful to remote employees and coworkers.
dsp73
Two big useful tools are one, File Storage tools, and two, Project Management Tools.
5 0
3 years ago
Let cell E2 = 100, what is the result of this formula? =NOT(E2&lt;100) *
lukranit [14]

Answer:

True

Explanation:

7 0
3 years ago
Which pair of properties apply to both sound and electromagnetic waves?
Alex73 [517]
Both waves can have interference, reflection, and diffraction.

Wave interference is a phenomenon that occurs when two waves meet while traveling along the same medium. The interference of waves causes the medium to take on a shape that results from the net effect of the two individual waves upon the particles of the medium.

Wave reflection happens when a wave reaches the boundary between one medium and another medium, a portion of the wave undergoes reflection and a portion of the wave undergoes transmission across the boundary.

Wave diffraction<span> involves a change in direction of waves as they pass through an opening or around a barrier in their path.<span> </span></span>
3 0
4 years ago
Read 2 more answers
The major objective of this lab is to practice class and object-oriented programming (OOP), and separate files: 1. We will reuse
vovangra [49]

Answer:

Implementation of resistor.cpp

#include "resistor.h"

Ohms::Ohm()

{

// default constructor

voltage=0;

}

Ohms::Ohm( double x) // parameterised constructor

{

voltage = x; // voltage x set to the supply voltage in the private data field called voltage

}

Ohms:: setVoltage(double a)

{

voltage = a;// to set supply voltage in private data field called voltage

}

Ohms::setOneResistance( String s, double p)

{

cin>>p; //enter the resistance value

if(p<=0) // if resistance is less than or equals to 0

return false

else // if re

cin.getline(s);

}

Ohms::getVoltage()

{

return voltage; //return voltage of ckt

}

Ohms::getCurrent()

{

return current; //return current of ckt

}

Ohms:: getNode()

{

return resistors; //return resistors of ckt

}

Ohms::sumResist()

{

double tot_resist = accumulate(resistors.begin(),resistors.end(),0); //std::accumulate function for calculating sum //of vectors and following are the starting and ending points

return tot_resist;

}

Ohms::calcCurrent()

{

if(current <=0) // if current is less than or equal to 0

return false;

else   // if current is greater than 0

return true;

}

Ohms:: calcVoltageAcross()

{

if(voltage<=0) // if voltage is less than or equal to 0

return false;

else //if voltage greater than 0

return true;

}

Explanation:

in the case of main.cpp its simple just make a class object and remember to include resistors.cpp with it for which the second last picture describes the process precisely. (Hint: Use theunit test case functions in the main.cpp).

As you can see node is a structure consisting of member variables, followed by a class Ohms representing a DC circuit.

By looking at these pictures, it is needed to implement the main.cpp and resistor.cpp files. The user defined header file resistor.h already consists of all contents of Class Ohm, struct node. You don't need to modify it in anyway in such case.

8 0
3 years ago
Other questions:
  • ________ is the gathering, organizing, sharing, and analyzing of the data and information to which a business has access.
    6·1 answer
  • Where do you go to create a workbook?​
    8·1 answer
  • A company that offers services for accessing and using the Internet is: *
    10·1 answer
  • What type of storage system is a hard drive on a computer?<br> Need HELP fast, please.
    9·2 answers
  • The operation:
    8·1 answer
  • A technician is configuring a new SOHO multifunction wireless router at a customer’s location to provide network access to sever
    12·1 answer
  • Rob is planning his housewarming party. He wants to design an invitation and personalize it for each invitee. He needs to create
    11·1 answer
  • It is where the home tab is located where you can view all the all the formatting purpose <br>​
    11·1 answer
  • 50 POINTS
    6·1 answer
  • Explain why the scenario below fails to meet the definition of a stakeholder.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!