Professional Documents
Culture Documents
CC103 Project
CC103 Project
Prelim Project
1. Write a program that will input for a text and will replace :) with
smiley emoticon.
Sample Output:
Answer:
message = input(“Enter Message: “)
emoji = message.replace(“:)”, “🙂”)
print(emoji)
message = input( “Enter Message: “)
smiley = message.replace(“:)”, “🙂”)
print(smiley)
2. Write a program that will input for an amount (including the currency)
and discount (in percentage). The program will then compute for the
discount.
CC 103
Prelim Project
Sample Output:
Enter Price: $100
Percentage (Discount): 1%
Discount: $1.00
Answer:
string = input (“Enter Price: “)
price = float ( string[1:])
disc_percent= input (“Percentage (Discount): “)
disc = float (disc_percent[:-1])
disc_amount = price * (disc/100)
print (“Discount: “,”${:2f}”.format(disc_amount))