forked from cyberwest/Ravensbourne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mymodule.py
22 lines (17 loc) · 1.18 KB
/
mymodule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
## mymodule: a module containing functions to print a message, convert temperatures and find the 3rd letter of a word ##
# INSTRUCTIONS
# Write code for the three functions below:
# This function should use 'raw_input' to ask for the user's name, and then print a friendly message including
# the user's name to the command line (e.g. "Hi there Bob! Good to see you again!")
def helloMessage():
print "You need to write your own code before running this function!"
# This function should take in a temperature in Kelvin, convert it to Celsius and print the result as part of a string
# (e.g. 100 degrees Celsius is 373 Kelvin). HINT: you'll need to convert the result of the calculation to a string.
# Google is your best friend!
def Kelvin2Celsius(kelvin):
print "You need to write your own code before running this function!"
# This function should take in a word, and return the third letter of that word as part of a string to the command line
# (e.g. "The third letter of the word banana is 'n'). HINT: you can access the n^th letter of a word using square
# brackets. If you get stuck, ask me!
def thirdLetter(word):
print "You need to write your own code before running this function!"