Home/python

python

Callout blocks

Feature cards - Callout with Default background
 
page icon

Business plans

Modernize IT service and operations with anintuitiv many operations.IT service and operations with anintuitiv many operations.
page icon

Creative website

Modernize IT service and operations with anintuitiv many operations.IT service and operations with anintuitiv many operations.
page icon

Business plans

Modernize IT service and operations with anintuitiv many operations.IT service and operations with anintuitiv many operations.
Testimonial cards - Callout with Grey background
 
page icon

Allen walker

Lorem ipsum dolor sit am et, consectetur adipiscing elit. Aliquam sem ex, dign ssimvarius bibendum pellentesque, condimen tum nec ante.
page icon

Chris jordan

Lorem ipsum dolor sit am et, consectetur adipiscing elit. Aliquam sem ex, dign ssimvarius bibendum pellentesque, condimen tum nec ante.
page icon

Paul harris

Lorem ipsum dolor sit am et, consectetur adipiscing elit. Aliquam sem ex, dign ssimvarius bibendum pellentesque, condimen tum nec ante.
 
page icon
Lorem ipsum dolor sit am et, consectetur adipiscing elit. Aliquam sem ex, dign ssimvarius bibendum pellentesque, condimen tum nec ante.
- Allen walker
page icon
Lorem ipsum dolor sit am et, consectetur adipiscing elit. Aliquam sem ex, dign ssimvarius bibendum pellentesque, condimen tum nec ante.
- Allen walker
 

Tip Calculator

#tip calculator print("Welcome to the tip calculator!") #get user inputs bill = float(input("What was the total bill? $")) tip = int(input("What percentage tip would you like to give? 10, 15, 18? ")) people = int(input("How many people to split the bill? ")) #calculate the total amount of tip tip_as_percent = tip / 100 #calculate the total tip amount total_tip_amount = bill * tip_as_percent #calculate the total bill including tip total_bill_with_tip = round(bill + total_tip_amount, 2) #calculate the amount each person should pay bill_per_person = round(total_bill_with_tip / people, 2) #formatted string for output #:2f formats the number to 2 decimal places print(f"The total bill is ${total_bill_with_tip:2f}. Each person should pay: ${bill_per_person:.2f}")
 
html sample
Tip Calculator

Python Tip Calculator

bill = float(input("What was the total bill? $")) tip = int(input("What percentage tip would you like to give? 10, 15, 18? ")) people = int(input("How many people to split the bill? ")) tip_as_percent = tip / 100 total_tip_amount = bill * tip_as_percent total_bill_with_tip = round(bill + total_tip_amount, 2) bill_per_person = round(total_bill_with_tip / people, 2) print(f"The total bill is ${total_bill_with_tip:.2f}. Each person should pay: ${bill_per_person:.2f}")