hourly.py

# hourlyJO.py by Jesenya Olivas

# Initialize variables
name = str(“Jesenya”)
job = str(“lawyer”)
wage = float(“273.41”)
shift = int(11)
# Intro to self
print(“Hello, my name is”, name, “and I am a”, job,”.” )
print(“I make”, wage, “an hour and I work an”, shift,”shift.” )
# Counter (1 hour)
for i in range(shift):
# 1 hour
if i == 0:
print(“After”, i+1,”hour, I make”, wage,”.”)

# 2+ hours
else:
print(“After”, i+1, “hours, I make”, round(wage*(i+1), 2),”.”)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s