1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jeka57 [31]
3 years ago
9

Write a Python Program that:

Computers and Technology
1 answer:
Andreyy893 years ago
5 0

Answer:

To collect data from an user you need to use an input

Explanation:

Therefore,

firstName = input("First name: ")

ageInYears = input("Age in Years: ")

weightInKilograms = input("Weight in Kilograms: ")

and then print all the values:

print(firstName, int(ageInYears), float(weightInKilograms))

You might be interested in
Which of the following is not related to text formatting?​
s2008m [1.1K]

Explanation:

Searching, hope that helps. its 100% correct, goodluck.

3 0
2 years ago
You have been given the job of creating a new order processing system for the Yummy Fruit CompanyTM. The system reads pricing in
Dmitriy789 [7]

Answer:

Invoice.java

import java.util.*;

public class Invoice {

   static final String endPrices = "END_PRICES";

   static final String endInvoice = "END_INVOICE";

   static final String quit = "QUIT";

   public static void main(String... args) {

       Scanner sc = new Scanner(System.in);

<em>        //HashMap to store fruit name as key and price as value </em>

       Map<String, Float> fruits = new HashMap<>();

<em>        //Loop until input is not "END_PRICES" </em>

       while (true){

           String input = sc.next();

<em>            //Come out of loop if input is "END_PRICES" </em>

           if(input.equals(endPrices))

               break;

           float price = Float.parseFloat(sc.next());

<em>            //add fruit to hash map </em>

           fruits.put(input, price);

       }

<em>        //ArrayList to store total cost of each invoice </em>

       List<Float> totalList = new ArrayList<>();

       Float total = 0f;

<em>        //loop until input becomes "QUIT" </em>

       while (true){

           String input = sc.next();

<em>            //Break out of the loop if input is "QUIT" </em>

           if(input.equals(quit)){

               break;

           }

<em>            //Add total price of the invoice to array list and set total to "0f" to store total of next invoice </em>

           if(input.equals(endInvoice)){

               totalList.add(total);

               total = 0f;

               continue;

           }

           int quantity = sc.nextInt();

           total += (fruits.get(input)*quantity);

       }

<em>        //Iterate through all objects in the total Array List and print them </em>

       Iterator itr = totalList.iterator();

       while (itr.hasNext()){

           System.out.printf("Total: %.2f \n", itr.next());

       }

   }

}

7 0
3 years ago
When you lost important information how do you gain the information back?
irinina [24]
By going to deleted items

6 0
3 years ago
Read 2 more answers
What component on a smartphone requires pairing with another device?
MatroZZZ [7]
To pair with another device such as a speaker you would use the Bluetooth feature to link the two devices together, also known as pairing.
3 0
3 years ago
Finish the format string to get the output shown below.<br> Day<br> &gt;&gt;&gt;{ v8'_format('Day)
Lorico [155]

In C language, a Format string refers to a string utilized to format output or input. The complete format string is: >>>{% v8'_format('Day)

<h3>What is Format String?</h3>

In computer programming, a format string is a string that is used when formatting the input and output of functions.

It is responsible for the format of the input and output. In C language, it always starts with '%'.

Hence the completed format string will be: >>>{% v8'_format('Day).

Learn more about format strings ta:
brainly.com/question/26000102
#SPJ1

Learn more about Format String at:
brainly.com/question/26000102
#SPJ1

8 0
2 years ago
Other questions:
  • Your company is developing a new marketing campaign and wants to know which customers have never placed an order. You will need
    10·1 answer
  • Access controls are enforced automatically in FMS service routines that access and manipulate files and directories.
    9·1 answer
  • If you are driving at night, you should not use high-beam headlights within _________ of oncoming vehicles. Florida Road Rules 4
    9·2 answers
  • How can a network design project benefit from the principles of itsm? How might itsm impede a network design project?
    11·1 answer
  • Dustin runs a command at the command line trying to find out what kernel version the system is running. However, it doesn't give
    12·1 answer
  • When changing lanes on an expressway signal your intentions and?
    8·1 answer
  • Do you agree that technology can be used to commit acts of violence ? Explain why or why not
    11·1 answer
  • How to add a bill using the reciept capture?
    7·1 answer
  • The process of sending a result back to another part of the program is
    14·1 answer
  • Escribe 10 ejemplos de lo que consideras un byte
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!