cs50python icon indicating copy to clipboard operation
cs50python copied to clipboard

set0

Open rohit20032003 opened this issue 1 year ago • 1 comments

indoor

indoor.py

correct codes def main(): user_input = input("Please enter some text: ") print(user_input.lower())

if name == "main": main()

tip def main(): dollars = dollars_to_float(input("How much was the meal? ")) percent = percent_to_float(input("What percentage would you like to tip? ")) tip = dollars * percent print(f"Leave ${tip:.2f}")

def dollars_to_float(d): # Remove the leading $ and convert to float return float(d.replace("$", ""))

def percent_to_float(p): # Remove the trailing % and convert to float, then divide by 100 to get the decimal value return float(p.replace("%", "")) / 100

main()

rohit20032003 avatar Jun 28 '24 09:06 rohit20032003

hi @rohit20032003 have the assignments changed?

aviiciii avatar Jun 28 '24 10:06 aviiciii