This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def lucky_number(name): | |
| number = len(name) * 9 | |
| message = "Hello " + name + ". Your lucky number is " + str(number) | |
| return message | |
| print(lucky_number("Kay")) | |
| print(lucky_number("Cameron")) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # This function compares two numbers and returns them | |
| # in increasing order. | |
| def order_numbers(number1, number2): | |
| if number2 > number1: | |
| return number1, number2 | |
| else: | |
| return number2, number1 | |
| # 1) Fill in the blanks so the print statement displays the result | |
| # of the function call | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 1) Complete the function to return the result of the conversion | |
| def convert_distance(miles): | |
| km = miles * 1.6 # approximately 1.6 km in 1 mile | |
| return(km) | |
| my_trip_miles = 55 | |
| # 2) Convert my_trip_miles to kilometers by calling the function above | |
| my_trip_km = convert_distance(my_trip_miles) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def rectangle_area(base, height): | |
| area = base*height # the area is base*height | |
| print("The area is " + str(area)) | |
| rectangle_area(5,6) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # REPLACE THIS STARTER CODE WITH YOUR FUNCTION | |
| #june_days = 30 | |
| #print("June has " + str(june_days) + " days.") | |
| #july_days = 31 | |
| #print("July has " + str(july_days) + " days.") | |
| def month_days(month,days): | |
| print(month + " has " + str(days) + " days.") | |
| month_days("June","30") | |
| month_days("July","31") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def get_seconds(hours, minutes, seconds): | |
| return 3600*hours + 60*minutes + seconds | |
| amount_a = get_seconds(2,30,0) | |
| amount_b = get_seconds(0,45,15) | |
| result = amount_a + amount_b | |
| print(result) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def print_seconds(hours, minutes, seconds): | |
| print(3600*hours + 60*minutes + seconds) | |
| print_seconds(1,2,3) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | word1 = "How" | |
| word2 = "do" | |
| word3 = "you" | |
| word4 = "like" | |
| word5 = "Python" | |
| word6 = "so" | |
| word7 = "far?" | |
| print(word1, word2, word3, word4, word5, word6, word7) | |
| //print(' '.join([eval(str('word'+str(i+1))) for i in range(7)])) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | bill = 47.28 | |
| tip = (bill * (15/100)) | |
| total = bill + tip | |
| share = total/2 | |
| print("Each person needs to pay: " + str(share)) |