#What am I missing?

48 messages · Page 1 of 1 (latest)

fringe bone
#

salespercent = int(input("what is the total bill?: "))

#Prompt the user for the # of people plitting th bill
nopeople = int(input("How many people are splitting thee bill?: "))
print("/n")
#Calculate the value each person owes based on the bill
payment_per_person = ("%.2f" % round(float(((salespercent / 100 +1) ' totalbill) / nopeople), 2))'

salespayment = "%.2f" % float(salespercent / 100 ' totalbill)
print(f"Tip amount: $(salespayment)")


totalbill = float(totalbill)
salepayment_float = float(salespayment)
total = (totalbillfloat+salespayement_float)

print(f"Total bill including tip: $(total)")

print(f"Each person owes: $(payment_per_person)")```
dawn runeBOT
next geyser
#
totalbill = float(input("what is the total bill?: "))

salespercent = int(input("what is the total bill?: "))

#Prompt the user for the # of people plitting th bill
nopeople = int(input("How many people are splitting thee bill?: "))
print("/n")
#Calculate the value each person owes based on the bill
payment_per_person = ("%.2f" % round(float(((salespercent / 100 +1) ' totalbill) / nopeople), 2))'

salespayment = "%.2f" % float(salespercent / 100 ' totalbill)
print(f"Tip amount: $(salespayment)")


totalbill = float(totalbill)
salepayment_float = float(salespayment)
total = (totalbillfloat+salespayement_float)

print(f"Total bill including tip: $(total)")

print(f"Each person owes: $(payment_per_person)")
#

Oh there's definitely some kinda formatting error somewhere on salespayment line

#

Or payment_per_person

#

@fringe bone Why are you using strings on those lines?

#

100 ' totalbill

#

or salespercent / 100 +1) ' totalbill) / nopeople), 2))'

fringe bone
#

I kinda just started coding yesterday so I'm looking for help everywhere

next geyser
#

?

#

Are you trying to follow a tutorial or guide for some other language than Python?

fringe bone
#

I was taking a tutor class

#

just before I submitted that

#

but it's python

next geyser
#

This is supposed to be Python, right?

fringe bone
#

yeah

next geyser
#

print(f"Total bill including tip: $(total)")

#

Python f-strings use {...}

fringe bone
#

ohhhhhhhhhhhhh

next geyser
#

Not $(...)

fringe bone
#

bruhhhh

next geyser
#

And, what calculation is this supposed to be?
salespercent / 100 ' totalbill

fringe bone
#

What I'm trying to do is

#

1.- Make a Program in python to Calculate the Tip Amount of a Restaurant Bill. Make option is you are going to Pay alone or Split the Charges.

next geyser
#

Yeah, checked your other help channel as well

#

But, salespayment = "%.2f" % float(salespercent / 100 ' totalbill)

What are you trying to do with this line?

#

Python uses ' for strings

#

And % is modulo

fringe bone
#

okay so that's what was wrong.

next geyser
#

There's a lot going on with that code that's not even Python

fringe bone
#

bruhhh

#

i feel dumb

next geyser
#

Basically, everything after this:

totalbill = float(input("what is the total bill?: "))

salespercent = int(input("what is the total bill?: "))

#Prompt the user for the # of people plitting th bill
nopeople = int(input("How many people are splitting thee bill?: "))
print("/n")
#

Walk me through what are the payment_per_person and salespayment lines supposed to do?

fringe bone
#

I was wondering why the visual studio was tripping

next geyser
#

Also, you can just use an empty print to get an empty new line

#

!exec

print("Hello")
print()
print("world!")
dawn runeBOT
fringe bone
#

ohh I never thought of that. I'm gonna use it

#

Thank you

next geyser
#

("%.2f" % round(float(((salespercent / 100 +1) ' totalbill) / nopeople), 2))'

What's this calculation trying to do?

fringe bone
#

so lets just not talk about it

#

it never happened

#

but i think i'm done with the other one

#

but i'm having trouble getting the last string to be apart of the other 2 strings

#

actually no only one of them is responding now