Flowcharting Assignment (1)

.docx

School

Tidewater Community College *

*We aren’t endorsed by this school

Course

100

Subject

Industrial Engineering

Date

Apr 3, 2024

Type

docx

Pages

3

Uploaded by CommodoreArtFlamingo40

Report
Flowcharting Assignment 1. After entering two values representing the feet and inches of a person’s height, calculate their height in total inches and display the results. a. Input Feet = float(input(“Enter the feet: “)) Inches = float(input(“Enter the inches: “)) Process Total_inches = (feet * 12) + inches Output Print(“Total height in inches:”, total_inches) 2. Given the state tax of a new car is $372.25 and the county tax is $41.60, calculate the total tax amount and output the results. All values should be assigned to variables. a. Variables State_tax = 372.25 County_tax = 41.60 Calculations Total_tax = state_tax + county_tax Output Print(“total tax amount:”, total_tax) 3. After three test values are entered, determine the smallest of the three tests and print the value. Use variables to represent the three tests. a. Input Test 1 = float(input(“enter the first test value: “)) Test 2 = float(input(“enter the second test value: “)) Test 3 = float(input(“enter the third test value: “)) Process Smallest_test = min(test1, test2, test3)
Output Print(“the smallest test value is:” , smallest_test) 4. Compute the total inventory value of 6 inventory items. The input will be data on 6 inventory items to be processed one at a time. The input data includes the item name, quantity on hand and price per item. For each item compute and print the inventory value. Accumulate a running total of the inventory value. After all data has been processed, display the total inventory value. You will need to initialize a counter and an accumulator for the total inventory value. a. Accumulator Total_inventory_value = 0 Process 6 inventory items For i in range(6): Input Item_name = input(“enter item name:”) Quantity_on_hand = int(input(“enter quantity on hand:”)) Price_per_item = float(input(“enter price per item:”)) Calculations Inventory_value = quantity_on_hand * price_per_item Print Print(“inventory value for”, item_name, “:” , inventory_value) Accumulate total Total_inventory_value += inventory_value Output Print(“total inventory value:” , total_inventory_value) 5. You want to record the results of flipping a penny, one at a time. Determine the number of heads and tails and display the output. You have decided to enter ‘X’ when you are done flipping the penny. a. Initialize counters Heads_count = 0
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help