This document contains the code for a BASIC program that calculates the time required to lift a given mass of water to a specified height using a motor with a given power. It takes user input for the mass, height, and motor power. It then calculates the time in seconds required using the formula Time = Mass x Gravity x Height / Power. The program also displays the calculation and draws a graphic depicting water being lifted over time.
1. 5 KEY OFF:CLS
10 PRINT"PHYSICS-ROBERT LEHRMAN A motor operating a pump has 240w of power.How
long will it take the system to raise 100 kg of water 12 meters? 49
seconds":PRINT
11 INPUT"Kilograms to raise";MASS
21 PRINT
31 INPUT"Height to be raised meters";HEIGHT
41 PRINT
51 INPUT"Power of motor (watts)";WATTS
61 YARDS = HEIGHT * (.914)
71 FEET = HEIGHT* 3.281
101 T = MASS * 9.8 * HEIGHT / WATTS
105 R = 1/T
107 U = T / 3600
111 POUNDS = MASS * 2.2
125 GA = MASS * .264111
500 CLS:SCREEN 8 :PALETTE 2,9
505 PRINT " Time = Mass X 9.8(g) X (Height/Watts)";T
507 PRINT " 9.8(g) Standard gravity m/s^2"
508 DRAW"bm0,50 r30u50l30d50"
510 LINE(130,173)-(150,173),2
520 LINE(130,174)-(150,174),2
530 LINE(130,175)-(150,175),2
540 LINE(130,176)-(150,176),2
550 LINE(130,177)-(150,177),2
560 LINE(130,178)-(150,178),2
570 LINE(130,179)-(150,179),2
580 LINE(130,180)-(150,180),2
590 LINE(130,181)-(150,181),2
600 LINE(130,182)-(150,182),2
610 LINE(130,183)-(150,183),2
620 LINE(130,184)-(150,184),2
630 LINE(130,185)-(150,185),2
640 LINE(0,50)-(300,50),3
650 LINE(131,20)-(149,20),3
660 LINE(131,35)-(149,35),3
670 LINE(150,30)-(150,185),1
680 LINE(130,30)-(130,185),1
690 LINE(131,20)-(131,35),3
700 LINE(149,20)-(149,35),3
710 LINE(138,35)-(138,183),3
720 LINE(142,35)-(142,183),3
730 LINE(10,24)-(131,24),3
740 LINE(10,28)-(131,28),3
776 FOR Q = 1 TO 150 STEP 100 / T
780 LINE(139,185)-(139,185-Q),2
790 LINE(140,185)-(140,185-Q),2
795 LINE(141,185)-(141,185-Q),2
797 SOUND 900-Q*4,1
800 NEXT Q
810 FOR W = 1 TO 120 STEP 1
820 LINE(131-W,25)-(131-W,25),2
830 LINE(131-W,26)-(131-W,26),2
840 LINE(131-W,27)-(131-W,27),2
841 NEXT W
843 SR = MASS/4
845 IF SR > 37 THEN SR = 37
2. 851 FOR I = 1 TO SR STEP T/7200
854 LINE(10,25)-(10,48),2
856 LINE(2,49-I)-(28,49-I),2
857 NEXT I
860 LINE(139,185)-(139,185-Q),3
862 LINE(140,185)-(140,185-Q),3
864 LINE(141,185)-(141,185-Q),3
866 LINE(10,25)-(10,48),2
875 LOCATE 14,25 :PRINT WATTS;"WATT MOTOR"
880 LOCATE 19,25 :PRINT "TIME TO LIFT"
881 LOCATE 20,1 : PRINT GA;"GALLONS"
882 LOCATE 20,25 :PRINT MASS;"KG OF "
885 LOCATE 21,25 :PRINT "WATER"HEIGHT"METERS"
887 LOCATE 22,25:PRINT INT(T)"SECONDS"
888 LOCATE 21,1:PRINT FEET;"FEET"