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
torisob [31]
4 years ago
9

python Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), a

nd will create a file Fahrenheit.dat that contains the same temperatures (one per line, in the same order) in Fahrenheit
Computers and Technology
1 answer:
jekas [21]4 years ago
6 0

with open('celcius.dat', 'r') as fIn, open('fahrenheit.dat', 'w') as fOut:

   for line in fIn:

       fahrenheit = 9.0 / 5.0 * float(line) + 32

       fOut.write("%.1f\n" % fahrenheit)


You can control the number of decimals in the formatting clause in the write statement.

You might be interested in
You are flying on an ifr flight plan at 5500 feet with a vfr on top clearance when you encounter icing. you know there is clear
zepelin [54]

Answer:

A. Yes, you are still IFR with VFR-on-top clearance

Explanation:

Instrument Flight Rules (IFR) and Visual Flight Rules (VFR) are regulations controlling the operations of civil aviation. Pilots use these terms as well to describe their flight plan.

When your request is rejected to fly 9500 feet from atc, your VFR-on-top clearance is still active and you are still IFR.

8 0
4 years ago
The calcCircleCircumf() method invoked within in the CircleStatsTester class is overloaded. Write the overloaded methods in the
solong [7]

Answer:

The program to this question as follows:

Program:

class CircleStats //defining class  

{

CircleStats() //creating default constructor

{

}

float calcCircleCircumf(float radius) //defining method  

{

   return (float)(2 * Math.PI * radius); //return value

}

double calcCircleCircumf(double diameter) //overload the method

{

   return (2 * Math.PI * (diameter/2)); //return value

}

}

public class CircleStatsTester //defining class  

{

public static void main(String ar[]) //defining main method  

{

int diameter = 5; //defining integer variable

double radius = 2.5;//defining float variable

CircleStats cStats = new CircleStats(); //creating CircleStats class object

System.out.println("The circumference = " + cStats.calcCircleCircumf(diameter)); //print value

System.out.println("The circumference = " + cStats.calcCircleCircumf(radius));  //print value

}

}

Output:

The circumference = 31.4

The circumference = 7.853981633974483

Explanation:

In the above java program code, two-class is declared that are "CircleStats and CircleStatsTester". In the class "CircleStats" a default constructor is created then method overloading is performed in which two method is defined that have the same name but different parameters.

  • In the first-time method declaration, it contains a float variable "radius" in its parameter to calculate and return its value.
  • In the second time method declaration, it contains a double variable "diameter" in its parameter, calculates and returns its value.

Then another class CircleStatsTester is defined inside this class the main method is defined. In the main method, an integer and double type variable is defined that contains a value that is "diameter = 5 and radius = 2.5". In this method, an above class CircleStats object is created and call this class functions.

7 0
3 years ago
What is analog computer?​
Evgen [1.6K]

Answer:

Analog computers are special purpose computer which can mesuare continuously changing data such as temperature, pressure, voltage,etc.

3 0
3 years ago
The product of joint force development is a _____________.
sleet_krkn [62]

Answer:

trained and capable joint force.

Explanation:

The joint force development policy is in regards to the training and recruitment of military officials, to improve or promote the growth and speedy development of recruits in the United States military.

Several aspects of military training are given to officials by joint parties from different but collaborating organizations. Joint education, deployment, and dissemination of employment various members of the armed forces are encouraged.

7 0
3 years ago
What is the basic difference between x.509 and pgp in terms of key hierarchy and key trust?
ra1l [238]
In terms of key hierarchy, you have to request to a Certification Authority in order for them to issue you an X.509 certificate. On the other hand, you can creat your own pgp.

In terms of key trust, X.509 supports only a sole key owner. It can support only one digital signature to confirm the key's validity. This does not work for pgp.
3 0
3 years ago
Other questions:
  • When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
    7·2 answers
  • Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
    8·2 answers
  • How to make flashcards on microsoft word 2010?
    7·1 answer
  • Site won't let me log in and is glitching? Is rainly down?
    15·2 answers
  • Why would businesses apply cell protection to spreadsheet entries? Provide one specific example.
    10·1 answer
  • Secondary hard drive whats its purpose
    5·1 answer
  • A new attack involves hacking into medical records and then offering these records for sale on the black market. A medical recor
    14·1 answer
  • Designing a video game takes tons of creativity. What inspires your personal creativity and ideas for video games? Explain and g
    15·1 answer
  • Wanna play pubg<br><br><br>ill send u my id​
    5·2 answers
  • When passing a list of parameters to a stored procedure by name, you can omit optional parameters by:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!