subject

From math import *
def main():
firstItemname = input("what is the name of your first item? ")
firstItem = input("what is the price of your first item? ")
firstShiping = input("What is the price of shipping for the item? ")
secondItemName = input("what is the name of your second item? ")
secondItem = input("what is the price of your second item? ")
secondShiping = input("What is the price of shipping for the item? ")
thirdItemname = input("what is the name of your third item? ")
thirdItem = input("what is the price of your third item? ")
thirdShiping = input("What is the price of shipping for the item? ")
print("The subtotal for " + firstItemname + " is " + str(firstItem))
print("The subtotal for " + secondItemName + " is " + str(secondItem))
print("The subtotal for " + thirdItemname + " is " + str(thirdItem))
totalFirstitem = float(firstItem) + float(firstShiping)
print("Total cost for " + firstItemname + " Is " + str(totalFirstitem))
totalSeconditem = float(secondItem) + float(secondShiping)
print("Total cost for " + secondItemName + " Is " + str(totalSeconditem))
totalthirditem = float(thirdItem) + float(thirdShiping)
print("Total cost for " + thirdItemname + " Is " + str(totalthirditem))
totalNotax = float(firstItem) + float(firstShiping) + float(secondItem) + float(secondShiping) + float(thirdItem) + float(thirdShiping)
print("Your total without tax is " + str(totalNotax))
tax = .065 * (totalNotax)
print("The total tax is " + str(tax))
totalWithtax = float(tax) + float(totalNotax)
print("The total with tax is " + str(totalWithtax))

main()
Can someone convert this to work in java. it is currently in python.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
You can apply several different worksheet themes from which tab?
Answers: 1
question
Computers and Technology, 24.06.2019 00:20
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
Write an expression that will cause the following code to print "equal" if the value of sensorreading is "close enough" to targetvalue. otherwise, print "not equal". ex: if targetvalue is 0.3333 and sensorreading is (1.0/3.0), output is:
Answers: 1
You know the right answer?
From math import *
def main():
firstItemname = input("what is the name of your first ite...
Questions
question
English, 01.12.2020 23:10
question
History, 01.12.2020 23:10
question
Mathematics, 01.12.2020 23:10
question
Mathematics, 01.12.2020 23:10
question
Mathematics, 01.12.2020 23:10
question
Mathematics, 01.12.2020 23:10
question
Mathematics, 01.12.2020 23:10
Questions on the website: 13722367