Skip to content

draemonsi/ECE2112-Experiment1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Programming-Assignment-1

Experiment 1 | Introduction to Python Programming

ALPHABET SOUP PROBLEM: Create a function that takes a string and returns a string with its letters in alphabetical order.
Example:
alphabet_soup(“hello”) ➞ ehllo
alphabet_soup(“hacker”) ➞ acehkr

EMOTICON PROBLEM: Create a function that changes specific words into emoticons. Given a sentence as a string, replace the words smile, grin, sad and mad with their corresponding emoticon: Example:
image
emotify(“Make me smile”) ➞ Make me :) emotify(“I am mad”) ➞ I am >:(

UNPACKING LIST PROBLEM: Unpack the list writeyourcodehere into three variables, being first, middle, and last, with middle being everything in between the first and last element. Then print all three variables.
Example: lst = [1, 2, 3, 4, 5, 6]
Output: first: 1 middle: [2,3,4,5] last: 6

About

Experiment 1 | Introduction to Python Programming

Topics

Resources

Stars

Watchers

Forks