left0UNIVERSITI TUN HUSSEIN ONN MALAYSIA<br />FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING <br />DTI2143/DAM31303: ...
 (Note: PI=3.142 , circumference =2*PI*rad, and area= PI*rad2 )
Upcoming SlideShare
Loading in...5
×

Dam31303 lab sheet 4

282

Published on

Published in: Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
282
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Dam31303 lab sheet 4"

  1. 1. left0UNIVERSITI TUN HUSSEIN ONN MALAYSIA<br />FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING <br />DTI2143/DAM31303: COMPUTER PROGRAMMING<br />LAB EXERCISE 4 Regular expression and operators<br /><ul><li>Write a program to calculate circumference and area of a circle
  2. 2. (Note: PI=3.142 , circumference =2*PI*rad, and area= PI*rad2 )
  3. 3. The program should similar to:
  4. 4. Write a program to calculate average velocity, v of a particle on a line travelling between point p1 and p2 form time 1 to time 2
  5. 5. (Note : v=p2-p1t2-t1) , The program should similar to:
  6. 6. Write a program to calculate the amount of heat required to raise the mercury temperature. (Note: Specific heat capacity, c : Qm∆θ , therefore the quantity heat lost is Q= mc∆θ; Q for mercury=139 J kg-1 ℃-1 )
  7. 7. To solve: the bulb of thermometer contains 3.4g of mercury. What amount of heat is required to raise the temperature of the mercury from 30℃ to 100℃
  8. 8. The program should similar to:
  9. 9. Write a program to calculate:
  10. 10. The total amount a customer has to pay for items that he/she bought in a bookstore. The user will prompt the amount of each item bought and the total amount to be paid will be displayed. Price list:</li></ul>ItemPriceRed penRM 1.20PencilRM 0.80markerRM 3.40rulerRM 0.50<br />

×