Created
September 17, 2017 23:48
-
-
Save ulrichzwingli/0798550dc3ef16b5dd6afc6b63860ea4 to your computer and use it in GitHub Desktop.
codeLiteracy_Week2_Assignment1
This file contains 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
amIAlive = Yes # Binary answer to my existence | |
numOfRecipes = 3 # number of recipes i know how to cook | |
myFav = "Priyanka Chopra" # My Favourite Actor | |
myGPA = 8.3 # My GPA score in undergrad | |
myFavTvshows = ["24", "Game of Thrones", "Suits", "Fringe", "Black Mirror"]. # Favourite TV shows | |
baywatchCast = { "Director" : "Seth Gordon", "Lead Actor" : "Dwayne Johnson", "Villian" : "Priyanka Chopra"} # Cast and crew of Baywatch |
This file contains 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
{ | |
"Model Name": "I Phone X", | |
"Model Price": "Beyond my budget", | |
"Model Colours": "Space Grey, Silver", | |
"Screen Size": "5.8", | |
"Storage Capacity": "256 GB" | |
} |
This file contains 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
# let the user know what's going on | |
print ("Welcome to the assignment world!") | |
print ("Answer the questions below to weave a story.") | |
print ("-----------------------------------") | |
# variables containing all of your story info | |
yourGender = raw_input("Are you a Boy or a Girl? : ") | |
yourName = raw_input("What is your name?: ") | |
yourAge = raw_input("Your age?: ") | |
ageGap = raw_input("Age gap in years between u and ur closest sibling?: ") | |
activity1 = raw_input("Enter your favourite activity as a kid: ") | |
idol = raw_input("Enter the name of your childhood idol ") | |
profession = raw_input("Your current profession: ") | |
salutation = raw_input("What's your good bye line ?: ") | |
# this is the story. it is made up of strings and variables. | |
story = "Once upon a time there was a " + yourGender + " named " + yourName + " aged " + yourAge + " years old and his/her " \ | |
" sister was " + ageGap + " years elder. They loved to " + activity1 + ". " + yourName + "s ambition was to become a " + idol + ", " \ | |
" But destiny had other plans." + yourName + " ended up becoming a " + profession + ". Now " + yourName + " is happily married " \ | |
" with 3 kids. " + salutation +"!!!" | |
# finally we print the story | |
print (story) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
everything looks great, no errors! 👍 💯
Once upon a time there was a Boy named Bruno aged 9999 years old and his/her sister was 9982 years elder. They loved to computers!. Brunos ambition was to become a Michael Jordan, But destiny had other plans.Bruno ended up becoming a Operator. Now Bruno is happily married with 3 kids. Peace!!!!