Lab 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Republic of the Philippines

BATANGAS STATE UNIVERSITY


The National Engineering University
Alangilan Campus
Golden Country Homes, Alangilan, Batangas City, Batangas, Philippines 4200
Tel Nos.: (+63 43) 425-0139 loc. 2121 / 2221
E-mail Address: ceafa@g.batstate-u.edu.ph | Website Address: http://www.batstate-u.edu.ph

College of Engineering, Architecture and Fine Arts

CIVIL ENGINEERING PROGRAM


CpE 402: COMPUTER PROGRAMMING 2
LABORATORY #2

Name: ________________________________ Section:______________________


Sr-Code:______________________________

Create a phyton program for the following given:

A. Calories Burned
Running on a particular treadmill you burn 3.9 calories per minute. Design a program that
uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes.

B. First and Last


Design a program that asks the user for a series of names (in no particular order). After the
final person’s name has been entered, the program should display the name that is first
alphabetically and the name that is last alphabetically. For example, if the user enters the names
Kristin, Joel, Adam, Beth, Zeb, and Chris, the program would display Adam and Zeb.

Leading Innovations, Transforming Lives


Attache your codes and screenshots of simulation here:

A. Calories Burned

- (insert here)

B. First and Last

- (insert here)

Leading Innovations, Transforming Lives

You might also like