Design solution to a program that uses sequential statements

Assignment Help Python Programming
Reference no: EM132368945

Question

For this portion of the lab, you will design the solution to a simple program that uses sequential statements. (That means DO NOT use loops, functions, if/else, a menu etc...) You may draw a flowchart or write pseudocode. If you draw a flowchart, you will scan the drawing and submit it as a pdf or jpeg file.

Design a solution to the following problem: Your cousin is visiting from England and it is getting very annoying for you to constantly convert US measures to metric measures. After all, only 95% of the world uses the metric system. Using your programming prowess, you decide to write him a program that will perform the necessary conversions.

(The program design will convert ALL 5 measurements) But, wait, someone once told you that "hours of planning can save you weeks of programming." Keeping that in mind, you will first design a program that performs the following conversions:

a. Miles to kilometers - one mile = 1.6 kilometers

b. Fahrenheit to Celsius - the formula to calculate is (F - 32) * 5/9 where F is the Fahrenheit temperature

c. Gallons to liters - one gallon = 3.9 liters

d. Pounds to kilograms - one pound = 0.45 kilograms

e. Inches to centimeters - one inch = 2.54 centimeters (These are rounded - Please do not search for the exact conversion formula, just use what is provided here.)

When you design and code this program follow these directions:

1. You must prompt the user for input. As an example: You may say "William, please tell me how many miles you want converted to kilometers."

2. You will then store the input value in a variable

3. You will perform the conversion in an arithmetic expression. As an example to convert from inches to centimeters you will multiply the inches by 2.54, which is the number of centimeters in an inch. You will then store the result of this multiplication in some variable named inchesToCm.

4. After the calculation and assignment is complete, you will print the results. As an example, if you are converting 3 inches to centimeters, your output may resemble the following:

5. William, 3 inches is equal to 7.62 centimeters. Isn't that amazing!

6. Desk check your design and ensure that it does what it is meant to do

7. You will write the program using ONLY sequential statements ( no loops, if/else, functions) 8. You will convert ALL 5 measurements in ONE program.

Reference no: EM132368945

Questions Cloud

Describe the basic communication theory : Explain what is meant by the principle: "communication is inevitable, irreversible and unrepeatable." Give an example to illustrate your answer.
Generally accepted recordkeeping principles : What is the relationship between principles of IG and the eight Generally Accepted Recordkeeping Principles?
Identify the key public health issue for your spp : As an epidemiologist it is essential to be able to research public health issues in depth and built an understanding of what others have contributed.
Identify the risk-determine potential impact : According to Smallwood (2014) there are five basic steps to conducting a risk assessment: Identify the risk, Determine potential impact,
Design solution to a program that uses sequential statements : Your cousin is visiting from England and it is getting very annoying for you to constantly convert US measures to metric measures.
What are your preferred methods of communication : What are your preferred methods of communication and why? How will your preferred communication methods assist you in progressing toward successful achievement.
Describe two key system-oriented-technology trends : Describe two key system-oriented / technology trends that have brought IS-supported decision making to the forefront of the decision analysis field
What are the relevant facts as recited by the court : What are the relevant facts as recited by this court? What were the parties' arguments? What are the precise issues being litigated, as stated by the court?
How it poses challenges for amazon employees : How Amazon's distinctive management approach has contributed to its success and How it poses challenges for Amazon employees

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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