code:
def main():
groceries = []
total = 0
#loop through indefinite times untill user says no
ch = 'y'
while ch!='n':
#ask for item name, quantity and it's price
item = []
name = input("\nEnter item name : ")
quantity = int(input("Enter quantity of item : "))
price = float(input("Enter price of item : "))
item.append(name)
item.append(quantity)
item.append(price)
#add item to groceries
groceries.append(item)
#finding total price
total += (quantity*price)
ch = input("\nWant to add another item ? (y or n) : ").lower()
#printing reciept
print("\n\n{:<15}{:<10}{:<10}".format("Item","Quantity","Price"))
for item in groceries:
print("{:<15}{:<10}{:<10}".format(item[0],item[1],item[2]))
print("Total cost of items : ",total)
main()
PYTHON3 code Each of you will create a cash register / point of sale for your...
For this project your task is to update the RSS Reader program you wrote for the previous project so that it reads multiple RSS feeds and generates the same nicely formatted HTML page of links for each feed, plus an HTML index page with links to the individual feed pages. Your new program should ask the user for the name of an XML file containing a list of URLs for RSS v2.0 feeds (see below for the format of this...
How do i write the pseudocode for this java code? First, write
out pseudocode, and then create a program to help you by
accomplishing the following tasks:
: Use command line interface to ask the user to input the
following.
○ How many apples are on hand ○ How many apples should be in
stock ○ How many oranges are on hand ○ How many oranges should be
in stock
Perform an operation to determine how many of...
Additional code needed:
PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...
Please try to write the code with Project 1,2 and 3 in
mind. And use java language, thank you very much.
Create an Edit Menu in your GUI
Add a second menu to the GUI called Edit which will have one
menu item called Search. Clicking on search should prompt the user
using a JOptionPane input dialog to enter a car make. The GUI
should then display only cars of that make. You will need to write
a second menu...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
I
wrote this code but there’s an issue with it :
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
using namespace std;
class Borrower {
private:
string ID, name;
public:
Borrower() :ID("0"), name("no name yet") {}
void setID(string nID);
void setName(string nID);
string getID();
string getName();
};
void Borrower::setID(string nID) {
ID = nID;
}
void Borrower::setName(string nname) {
name = nname;
}
string Borrower::getID() {
return ID;
}
string Borrower::getName() {
return name;
}
class Book {
private:
string...
This assignment tests your ability to write C programs that handle keyboard input, formatted console output, and input/output with text files. The program also requires that you use ctype functions to deal with the logic. In this program, you will input from the user two characters, which should both be letters where the second letter > the first letter. You will then input a file character-by-character and output those letters that fall between the two characters (inclusively) to an output...
could you please help me with this problem, also I
need a little text so I can understand how you solved the
problem?
import java.io.File; import java.util.Scanner; /** *
This program lists the files in a directory specified by * the
user. The user is asked to type in a directory name. * If the name
entered by the user is not a directory, a * message is printed and
the program ends. */ public class DirectoryList { public static...
Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...