Created
May 31, 2020 05:32
-
-
Save claudchereji/423676a1fc9365d4a843e9a592e74c15 to your computer and use it in GitHub Desktop.
tip_calc.py
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
import appex, ui | |
import console | |
import os | |
label = ui.Label(font=('Menlo', 24), alignment=ui.ALIGN_CENTER) | |
label.text = 'Tip Calc: ' | |
appex.set_widget_view(label) | |
meal_price = eval(input('How much did you pay for the meal? ')) | |
tip = eval(input('What tip percentage would you like to leave? (15%, 20%, 30%)')) | |
f_tip = tip/100 | |
mealntip = meal_price*f_tip | |
print('Your tip is ', mealntip , 'and your total will be ', meal_price+mealntip) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Supposed to be a tip calculator widget. But... it doesn't work. Gonna figure it out though.