Seconds to (hours,minutes,seconds) conversion

Slides:



Advertisements
Similar presentations
Line Balancing Problem A B C 4.1mins D 1.7mins E 2.7 mins F 3.3 mins G 2.6 mins 2.2 mins 3.4 mins.
Advertisements

ProCalc Nsg 132 Calculating ml per hour Example 1 An IV will be administered using an infusion pump that delivers ml/hr. D2.5W (2.5% Dextrose in Water)
Dimensional Analysis In dimensional analysis always ask three questions: What data are we given? What quantity do we need? What conversion factors are.
© T Madas. How many hours in a day? How many minutes in a day? 1 hour = 60 minutes How many seconds in a day? 1 minute = 60 seconds 24 hours 24 x 60 =
CCGPS Coordinate Algebra Day 2
MATHEMATICS STANDARD : VII Bombay Cambridge Gurukul Time, Distance and Speed Time, Distance and Speed.
Warm Up Multiply. Write answers in simplest form:
Organized method of problem-solving Used in chemistry, physics, engineering, and medicine Communicates the path to scientists that follow your work Records.
Dimensional Analysis 1 foot = 12 inches1 mile = 5280 ft 1000 mL = 1 L4 quarts = 1 gal Dimension Analysis makes use of equivalent statements. What are some.
Unit 1 Relationships Between Quantities and Expressions Week 3 Lesson 1 Dimensional Analysis N.Q.1.
Unit Conversion: The Factor Label Method. You can convert from one unit to another using a conversion factor A conversion factor is an expression for.
computer
Conversion Factor Method of Analysis. Conversion Factor Method a.k.a. Dimensional Analysis.
Conversions 8th Grade Math.
Formula? Unit?.  Formula ?  Unit?  Formula?  Unit?
Dimensional Analysis or Unit Analysis
LecturePLUS Timberlake1 Chapter 1 Measurements Problem Solving Using Conversion Factors and SF’s.
WARM-UP: SOLVE FOR X. x = -7 x = m. HOMEWORK REVIEW.
Chapter 8 Measurements Problem Solving Using Conversion Factors.
Free Phone $25 a month 100 minutes then 35c per min Free Phone $25 a month 100 minutes then 35c per min Free Phone $20 a month 75 minutes then 25c per.
Algebra UNIT QUESTION: Why is it important to understand the relationship between quantities? Standard: MCC9-12.N.Q.1-3, MCC9-12.A.SSE.1, MCC9-12.A.CED.1-4.
Copyright © 2011 InteractiveScienceLessons.com 1 minute minute 60 seconds How many seconds are there in a minute? = 60 seconds.
Linear Speed.
Factor-Label Method (of conversion). The factor-label method was developed to keep track of units in multi-step conversion problems.
Dimensional Analysis. Imagine This! You’re driving along a highway in Mexico when you notice this sign What should your speed be in miles per hour?
Easy to assess and grade
SATMathVideos.Net Water is pumped into an tank at 20 gallons per minute. The tank has a length of 10 feet and a width of 5 feet. If the tank starts empty,
HOW CAN I USE A CLOCK TO HELP TELL ELAPSED TIME? UNIT 7 CONCEPT: MCC.4.MD.1 Elapsed Time.
Algebra 1 Dimensional Analysis. Standard: Reason quantitatively and use units to solve problems. MGSE9–12.N.Q.1 Use units of measure (linear, area,
Problem Solving fsUsing Conversion Factors
Using Ratio Reasoning to Convert Measurement Units
Choose a Count down Time by Clicking a Button Below.
High capacity filling system
Parameter Passing & Array Examples – Part 1
Year 11 Information evening
Dimensional Analysis Calculations with More than 2 Steps
Unit 1 notes… Dimensional Analysis
Dimensional Analysis.
Science and Measurement
BACK SOLUTION:
Time Revision.
PhD student, Industrial & Manufacturing Engineering, UW-Milwaukee
Dimensional Analysis In which you will learn about: Conversion factors
Compilation VS Interpretation
Problem Solving Using Conversion Factors
Conversion: 12 slices = one pizza
A football field is 100 yards in length. How many inches is that?
Unit Conversion/Dimensional Analysis
15 seconds left 30 seconds left 3 minutes left 2 minutes left 1 minute
Dimensional Analysis Chemistry.
1.4 microscopes and measuring pp
Conversion: 12 slices = one pizza
Single-Factor Dimensional Analysis
MONDAY, FEB. 3 DO NOW: 1-Rearrange the formula v = d
Problem Solving Using Conversion Factors
©G Dear 2010 – Not to be sold/Free to use
An object travels 40 miles in 2 hrs. Calculate its speed?
Dimensional Analysis Chemistry.
Problem Solving fsUsing Conversion Factors
Sec 3.3: Derivatives Of Trigonometric Functions
break each vector into its components
Warm-up: Solve for x. x = -12 x = 9 x = -7 x = 50.
Introduction: Asymptotic Notation
Problem Solving Using Conversion Factors
Warm-up: Solve for x. x = -7 x = m.
Sec 4.3: HOW DERIVATIVES AFFECT THE SHAPE OF A GRAPH
CMPE400 – Summer Training Presentation
Converting derived units.
Exploration 1.4 Dimensional Analysis.
Presentation transcript:

Seconds to (hours,minutes,seconds) conversion 01204111 Computers and Programming Chalermsak Chatdokmaiprai Department of Computer Engineering Kasetsart University Revised 2018-01-23

# version 1 sec = int(input('How many seconds? ')) min = sec // 60 sec = sec % 60 hr = min // 60 min = min % 60 print(f'{hr} hours, {min} minutes, {sec} seconds')

# version 2 – same algorithm as version 1 sec = int(input('How many seconds? ')) min,sec = sec // 60, sec % 60 hr,min = min // 60, min % 60 print(f'{hr} hours, {min} minutes, {sec} seconds')

Alternative Solution: Using derived mathematical formalas (inspired by a student's solution)

# version 3 -- using formulas sec = int(input('How many seconds? ')) hr = sec // 3600 min = (sec//60) % 60 sec = sec % 60 print(f'{hr} hours, {min} minutes, {sec} seconds')