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
SCORPION-xisa [38]
3 years ago
11

Write a cash register program that calculates change for a restaurant of your choice. Your program should include: Ask the user

to input the cost of 3 items purchased by the customer* Tell the user the total cost of the items purchased Ask the user to input the amount paid by the customer Calculate and print the amount of change to be given to the customer
Computers and Technology
1 answer:
eduard3 years ago
4 0

Answer:

Python Code

Explanation:

total = 0.0

change = 0.0

itemone = float(input("Enter the first price: "))

itemtwo = float(input("Enter the second price: "))

itemthree = float(input("Enter the third price: "))

total = itemone + itemtwo + itemthree

print("Total:", total)

cash = float(input("Cash given: "))

change = total - cash

print("Your change:", change)

You might be interested in
1. W jaki sposób można wyrównać tekst po wstawieniu tabulatora?
Advocard [28]
I would say the correct answer is #1.
5 0
3 years ago
Write a function called is_present that takes in two parameters: an integer and a list of integers (NOTE that the first paramete
Agata [3.3K]

Answer:

The function in python is as follows

def is_present(num,list):

    stat = False

    if num in list:

         stat = True

       

    return bool(stat)

Explanation:

This defines the function

def is_present(num,list):

This initializes a boolean variable to false

    stat = False

If the integer number is present in the list

    if num in list:

This boolean variable is updated to true

         stat = True

This returns true or false        

    return bool(stat)

7 0
3 years ago
Normalize the following relation:
lora16 [44]

Answer:

Hi Riahroo! This is a good question on the concept of relational databases.

We can normalize the relations as follows:

Flight

(flightnumber (unique), flighttime, airline_id, departure_city, arrival_city,  passenger_id, pilot_id, airplane_id)

has_one_and_belongs_to :airline

has_many :passengers

has_one :pilot

Itinerary(passenger_id, flight_id)

Belongs_to  

Passenger_details  

(passengername (unique), gender, date_of_birth)

has_many :flights

Pilot

(pilotname (unique), gender, date_of_birth)

has_many :flights

airline(airlinename)

airplane(planeID, type, seats))

Explanation:

To normalize a relation, we have to remove any redundancies from the relationships between database objects/tables and simplify the structure. This also means simplifying many-to-many relationships. In this question, we see there is a many-to-many relationship between flights and passengers. To resolve this we can introduce a join table which simplifies this relationship to a one-to-many between the objects.  

5 0
4 years ago
Read the Security Guide about From Anthem to Anathema on pages 238-239 of the textbook. Then answer the following questions in t
Tems11 [23]

Answer:

Answer explained below

Explanation:

Think about all of the cloud services you use. How vulnerable are you right now to having your data stolen?

At its most basic level, “the cloud” is just fancy talk for a network of connected servers. (And a server is simply a computer that provides data or services to other computers). When you save files to the cloud, they can be accessed from any computer connected to that cloud’s network.

The cloud is not just a few servers strung together with Cat5 chords. Instead, it’s a system comprised of thousands of servers typically stored in a spaceship-sized warehouse—or several hundred spaceship-sized warehouses. These warehouses are guarded and managed by companies capable of housing massive loads of data, including the likes of Google (Google Docs), Apple (iCloud), and Dropbox.

So, it’s not just some nebulous concept. It’s physical, tangible, real.

When you save files to the cloud, you can access them on any computer, provided it’s connected to the Internet and you’re signed into your cloud services platform. Take Google Drive. If you use any mail, you can access Drive anywhere you can access your email. Sign in for one service and find your entire library of documents and photos in another.

Why are people concerned with cloud security?

It’s physically out of your hands.

You aren’t saving files to a hard drive at your house. You are sending your data to another company, which could be saving your data thousands of miles away, so keeping that information safe is now dependent on them. “Whether data is being sent automatically (think apps that sync to the cloud) or driven by users uploading photos to social media, the end result is that it’s all there somewhere being logged and stored,” says Jérôme Segura, Senior Security Researcher at Malwarebytes.

And that somewhere is a place that’s not in your direct control.

Risks of cloud storage

Cloud security is tight, but it’s not infallible. Cyber gurus can get into those files, whether by guessing security questions or bypassing passwords. That’s what happened in The Great iCloud Hack of 2014, where unwanted pictures of celebrities were accessed and published online.

But the bigger risk with cloud storage is privacy. Even if data isn’t stolen or published, it can still be viewed. Governments can legally request information stored in the cloud, and it’s up to the cloud services provider to deny access.

8 0
3 years ago
Can we update App Store in any apple device. (because my device is kinda old and if want to download the recent apps it aint sho
DIA [1.3K]

Answer:

<h2><em>F</em><em>o</em><em>r</em><em> </em><em>m</em><em>e</em><em> </em><em>y</em><em>e</em><em>s</em><em> </em><em>i</em><em> </em><em>g</em><em>u</em><em>e</em><em>s</em><em>s</em><em> </em><em>y</em><em>o</em><em>u</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>u</em><em>p</em><em>d</em><em>a</em><em>t</em><em>e</em><em> </em><em>a</em><em>n</em><em> </em><em>a</em><em>p</em><em>p</em><em> </em><em>s</em><em>t</em><em>o</em><em>r</em><em>e</em><em> </em><em>i</em><em>n</em><em> </em><em>a</em><em>n</em><em>y</em><em> </em><em>d</em><em>e</em><em>v</em><em>i</em><em>c</em><em>e</em></h2><h2><em>I</em><em>'</em><em>m</em><em> </em><em>n</em><em>o</em><em>t</em><em> </em><em>s</em><em>u</em><em>r</em><em>e</em></h2>

<h2><em>×_× mello ×_×</em></h2>
4 0
3 years ago
Other questions:
  • Write a java program called allDigitsOdd that returns whether every digit of a positive integer is odd. Return true if the numbe
    6·1 answer
  • Your employer is opening a new location, and the IT director has assigned you the task of calculating the subnet numbers for the
    14·1 answer
  • 1. If an F# function has type 'a -&gt; 'b when 'a : comparison, which of the following is not a legal type for it? Select one:
    14·1 answer
  • The function below takes a single argument: data_list, a list containing a mix of strings and numbers. The function tries to use
    6·1 answer
  • When individuals not involved in the development process are asked to test the game, this is called ________ group testing.
    11·1 answer
  • With whom does the success of information processing in the firm lie with?
    7·2 answers
  • Text Questions
    15·1 answer
  • Write a method that makes the input string of sentences ending with and
    11·1 answer
  • In this lesson, you learned how to create reports and how to display them in a Web application. You will use the same chinook da
    6·1 answer
  • For quantitative data (e.g. the number of milligrams of a drug) coding your data involves?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!