Fizika darslarida masala yechishda axborot texnologiyalaridan foydalanish
Fizika darsida masala yechishda chiziqli, tarmoqlanish va takrorlanuvchi algoritmlarga dasturlarni qarab o’tamiz. Chiziqli algoritmlar uchun misol va dastur.
1-misol. TU-154 samolyoti Termizdan-Toshkentgacha 800 km ga teng, masofani 1,2 soatda uchib o’tadi. Samolyotning harakatini teng o’lchamli harakat deb hisoblab uning tezligini aniqlang?
10 DATA 800,1.2 (Basic tilida)
20 READ S,T
30 V=S/T
40 PRINT “V=”; V
50 END
RUN
Program tezligini; ( Paskal tilida)
Var S,T,V:real;
Begin
S: =800;
T: =1.2;
V: =s/t;
WriteLn(‘v= ‘,v);
End.
Natija:
V=6.6666666667E+02
2-misol. Harakatsiz blokka 2 ip o’tkazib, har bir ipga M1=0,1kg va M2 =5kg, massa balandligi H=1m bo’lgan.
Ularning tezlanishini toping?
10 DATA 9.81,5,0.1,1
20 READ G, M2, M1, H
30 A=G*(M2-M1)/(M2+M1)
40 PRINT “A=”; A m1: q0.1;
50 PRINT “A=”; A
60 M1=M1+H
70 IF M1<=5 THEN 30
80 END
Program tezlanish;(Paskal tilida)
Var M1,M2,G, H,A:real;
Label 1;
Begin
M2:=5;
g:=9.8;
h:=1;
M1:=M1+h;
IF M1<=5 Then goto 1;
1: A=G *(M2-M1)/(M2+M1);
WriteLn(‘A= ‘,A);
End.
Natija:
A=6.2655737705E+00
3-misol. Odimi 10 bo’lgan, tananing 0 dan 100 sekund ichida vaqtning o’zgarishida, H balandlikdan tushgan tananing erkin tushish tezlanishini toping.
10 FOR T=1 TO 100 STEP 10
20 H=G * T^2
30 PRINT “H=”; H
50 NEXT T
60 GOTO 10
70 END
RUN
Program erkin tushish tezlanish (Paskal tilida)
Var T,G, H:real;
T:integer;
Begin
G: =9.8; T:=100;
While t<=100 do
Begin
H:= G * sqr(t)
WriteLn(‘H= ‘,H);
T:=t+10;
End;
End.
Shunday qilib, fizika darsida masalalarni yechishda kompyuterdan foydalanish maqsadga muvofiq bo’ladi.
Do'stlaringiz bilan baham: |