Convert between temperatures in fahrenheit

Assignment Help Basic Computer Science
Reference no: EM131716213

Write a Python application that allows the user to convert between temperatures in fahrenheit and temperatures in celsius. Below are the formulas for both, where Tc is temperature in celsius and Tf is temperature in fahrenheit:

Tc = (5/9)*(Tf-32)

Tf = ((9/5)*Tc)+32

Before you worry about that, though, design your GUI on paper. It is not obvious what buttons and fields are required. Look on the web to see how others have done this, sketch each screen and how it looks in different states. The font, use of white space and placement of controls is not important; focus on Which controls and what textfields will be present and what each will be used for. Be sure it is obvious to the user what she should do next and what the numbers on the screen mean.

Note that the user has to be able to type in either celsius or fahrenheit temperatures, and to perform repeated conversions in either direction. Try not to limit the user at all.

I recommend that you use tkinter, which comes standard with Python 3.x. However, if you would like to use a different GUI library you can do that.

It is important that you respect the separation between the View and the Model. This means that the classes that put the Frame, Buttons, etc up on the screen cannot contain any of the calculations. Also, the class (or module) that performs the calculations cannot do any of the user interaction. There will be a Controller between the Model and the View that takes care of the communication between the two of them.

As always, you must submit proof that your program runs. It is a little harder to record the run for a GUI like this. Here's how:

Windows: When the window that contains your output is up, press: <ALT> <Print Screen> to get the screen shot. Do not simply use <Print Screen> because you will end up with a screenshot of your entire desktop. Windows places the screen shot of just your Python application onto the clipboard. Now start Word or Notepad and paste the clipboard into your document. Please submit this document, containing a screen shot of the opening screen and a screen shot of the result of a calculation, together with your source code.

Mac: When the window that contains your output is up, press: <cmd> <shift><4> all at the same time. Mac OS makes your mouse into a marquee that you can drag from top left to bottom right of the screenshot. When you let go, Mac OS puts a file on your desktop called "Screen shot xxxx.png". Please submit a screen shot of the opening screen and a screen shot of the result of a calculation, together with your source code.

HINTS:

  • Make sure that you follow all the program guidelines!
  • It might help to start with the three files attached to the end of the section in the Module for "Week 10: Graphical User Interface"
  • In any case, you should have at least four files in your final submission, the Model, the View, the Controller and the file(s) containing the screen shots.
  • It will take you much longer to put all your code into one class at first, and split up the Model from the View from the Controller later. It is much faster to start with a simpler application spread across three files (M,V and C) and add functionality later to fulfill all the requirements. For example, you can start by implementing an app that only converts from Fahrenheit to Celsius. Just make sure you are clear what your user interface will look like (in a general way) before you start to code!
  • Notice that the Model consists entirely of only two methods. There is no reason for the Model to store any data at all, it will just be called upon to perform one calculation after another, returning the result of the calculation each time. This can be implemented as two standalone functions in their own module, as the built-in math functions are. Or it can be implemented as two static methods inside of a class. For more info about static methods, see the Module "An Object is an Instance of a Class", in the section "A Method that Belongs to the Whole Class".

Reference no: EM131716213

Questions Cloud

Create a python file called analysis : Problem 1 (Text Analysis) create a Python file called analysis.py that will perform text analysis on files.
Determine that boxplot find all the outliers : For the values 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 there are no outliers. If you increase 10 to 20, then 20 would be declared an outlier by a boxplot.
Examine principal way in which leadership of ncaa contribute : Examine the principal ways in which the leadership of the NCAA contributed to the ethical violations of Penn State, Ohio State, and the University of Arkansas.
Calculate the cost per equivalent unit for direct materials : Callahan Company uses the weighted-average method in its process costing system. The cost per equivalent unit for direct materials is
Convert between temperatures in fahrenheit : Write a Python application that allows the user to convert between temperatures in fahrenheit and temperatures in celsius.
Write a persuasive paper on your perspective of the case : Write a persuasive paper on your perspective of the given case study.You will tell me why you agree or disagree with the outcome.
What amount will be transferred out : Brevard Company uses the weighted-average method in its process costing system. Of the $ 4,000 total costs for direct materials, what amount will be transferred
Legalization of drugs would benefit the economy : Legalization of drugs would benefit the economy - You have a start to your outline. You need to provide details/specifics.
Devise a method for computing the sample variance : For a sample of n participants, the relative frequencies are f0/n = .2, f1/n = .4, f2/n = .2, f3/n = .15, and f4/n = .05. The sample mean is 1.45.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd