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
Natali [406]
3 years ago
10

(1) Prompt the user for an automobile service. Output the user's input. (1 pt) Ex: Enter desired auto service: Oil change You en

tered: Oil change (2) Output the price of the requested service. (4 pts) Ex: Enter desired auto service: Oil change You entered: Oil change Cost of oil change: $35 The program should support the following services (all integers): Oil change -- $35 Tire rotation -- $19 Car wash -- $7 If the user enters a service that is not l
Computers and Technology
1 answer:
Pavlova-9 [17]3 years ago
6 0

Answer:

In Python:

#1

service = input("Enter desired auto service: ")

print("You entered: "+service)

#2

if service.lower() == "oil change":

   print("Cost of oil change: $35")

elif service.lower() == "car wash":

   print("Cost of car wash: $7")

elif service.lower() == "tire rotation":

   print("Cost of tire rotation: $19")

else:

   print("Invalid Service")

Explanation:

First, we prompt the user for the auto service

service = input("Enter desired auto service: ")

Next, we print the service entered

print("You entered: "+service)

Next, we check if the service entered is available (irrespective of the sentence case used for input). If yes, the cost of the service is printed.

This is achieved using the following if conditions

For Oil Change

<em>if service.lower() == "oil change":</em>

<em>    print("Cost of oil change: $35")</em>

For Car wash

<em>elif service.lower() == "car wash":</em>

<em>    print("Cost of car wash: $7")</em>

For Tire rotation

<em>elif service.lower() == "tire rotation":</em>

<em>    print("Cost of tire rotation: $19")</em>

Any service different from the above three, is invalid

<em>else:</em>

<em>    print("Invalid Service")</em>

<em></em>

You might be interested in
We discussed in class the differences between Ruby and a language like Java. Based on our discussions, when do you feel it would
EleoNora [17]

Answer:

Ruby

It’s not a secret that our company places a bet on this interpreted scripting language created by Yukihiro Matsumoto in the far 1995. A bunch of deep-rooted technologies like Smalltalk, Python, Perl, Ada, C++, and others had an impact on shaping Ruby’s syntax and features. As a result, we got a technology known for elegant and expressive coding, as well as increased flexibility and productivity of development. It means that engineers take pleasure in writing code with Ruby and are not restricted in their vision on how to execute one thing or another.

Java

Despite Railsware’s unhidden preference towards Matsumoto’s brainchild, Java is also a part of our team’s arsenal. For example, we leveraged it together with other technologies within the Philips Directlife project. That’s to say, we know both of them and are happy to use whichever language best suits the task at hand.

In a sign of numerous Java and Ruby differences to be described a bit later, there is one undisputed similarity – they were born in the same year. Nevertheless, since then, Java has come through 11 versions with Java SE 11 as the latest one (compared to the Ruby’s latest release of 2.6.0). The technologies that influenced the creation of Java include C++, Ada 83, Object Pascal and others.

The TIOBE index shows that this compiled programming language overcame C in ranking and holds the first position as of the end of 2018. Moreover, it is a primary technology for Android native app development, which by the way was recently enhanced with Kotlin. Another facet of Java is that it is also an ecosystem of tools including Java Development Kit (JDK) for writing/running/compiling Java code, Java Virtual Machine (JVM) for running software built with Java and JVM languages within the same infrastructure to some degree of interoperability (for example, Kotlin for expressiveness and conciseness, Scala for functional programming, etc.), and Java Runtime Environment (JRE) for running Java apps. The basic points why developers opt for this technology are its reliability, platform independence, and ease of use.

Explanation:

The readers of our blog have already had a chance to get to know the duel of Ruby vs. PHP, as well as the combat Python vs. Ruby vs. Node.js. Today, we have Java vs. Ruby in turn.

Traditionally, we’re going to look at both technologies from a product owner’s perspective, which means learning not only technical differences between the languages, but also their actual use across different projects. Here we go.

Warm-up

Before any competition, the contestants need to warm up. It also happens that this term is used by one of the wrestlers, Java, for the lazy class loading of Java Virtual Machine. So, let’s not step out of line and have the competitors spiffed up to the battle.

Ruby

It’s not a secret that our company places a bet on this interpreted scripting language created by Yukihiro Matsumoto in the far 1995. A bunch of deep-rooted technologies like Smalltalk, Python, Perl, Ada, C++, and others had an impact on shaping Ruby’s syntax and features. As a result, we got a technology known for elegant and expressive coding, as well as increased flexibility and productivity of development. It means that engineers take pleasure in writing code with Ruby and are not restricted in their vision on how to execute one thing or another.

At the same time, this technology cannot be called popular. According to the TIOBE index as of December 2018, it is ranked 17th. Nevertheless, the language is not dying and keep afloat with the 3.0 version expected to be released in 2020. To sum up, Ruby allows programmers to enjoy what they do and be productive at once by following the principle of least astonishment.

Ruby key features

Apart from comparing Ruby to Java, let’s take a look at some key things one should know about this gem of a language.

Open-source

Interpreted language

Multi-platform

Dynamic + duck typing

Has a smart garbage collector

Everything including methods, numbers and variable is an object

You can embed Ruby into HTML

High scalability

Applicable for writing CGIs, building web and intranet apps

Support of different GUI tools including OpenGL, Tcl/Tk, and GTK

Support of Sybase, Oracle, MySQL, and DB2 connection

4 0
4 years ago
What are the first two models, e.g. diagrams that affect the entire system, that are built during the CoreProcess to discover an
mrs_skeptik [129]

Answer:

The answer is "Option c and Option d".

Explanation:

A diagram for a case use is a UML dynamic or computational diagram, that is used in the case diagram model. It consists of a set of actions, services, and functions to be carried out by the system. and The class diagram refers to relationships between the UML classes and the source code that dependence, that is two diagrams that affect the system and others are wrong, which can be explained as follows:

  • In option a, It is used for business process, that's is not correct.
  • In option b, It is used for both professionals industry like software and business, that's why it is wrong.
  • In option e, It is used in only high-level language, that's why it is wrong.
  • In option f, It is used to adjust its layout that's why it is wrong.

3 0
4 years ago
¿Qué podría pasar si los avances tecnológicos cayeran en personas sin formación Ética-Moral?
timurjin [86]

Answer:

If technological advances fall on people without Ethical-Moral training, then life itself would be threatened as our humanity and environment would be destroyed.

Explanation:

Question:

What could happen if technological advances fell on people without Ethical-Moral training?

Morals: Morals refer to human behavior. The principles of right and wrong

Ethics: It is the body of rules and regulations that dictate the conduct of practitioners of a particular profession.

In terms of technology, ethics is viewed in two contexts; if the pace of technological innovation is benefiting the humanity or not; if it is severely empowering people while choking others in the process.

Technology: it is the application of scientific principles for practical purposes of human life. Technology when used properly improves the quality of life of people.

On one hand, technology in itself is said to be neither good nor bad. It is people who determine it's application. With this said, we can infer that if technology falls on the wrong hands, it could be disastrous.

On the other, some technologies like nuclear fission, genetic engineering exert enormous power that their existence raises ethical or moral questions.

The role of ethical training in technological advancement would be to monitor rather than control to ensure fair practices.

Now if technological advances fell on people without ethical-moral training, then life itself would be threatened:

- Cultural breakdown: Almost everything in our day to day lives would depend on technology

- Loss of jobs: this would happen when machines do the work of men

- Inequalities as those with initial access to it would be the rich thereby widening the gap between the rich and poor.

- Exploitation as competition towards Mastery and control increases

- Environmental degradation

5 0
3 years ago
The value of the expression 20.0 * (9/5) + 32.0 is
Rama09 [41]

Answer:

68

Explanation:

9/5 = 1.8

20 * 1.8 + 32

20 * 1.8 = 36

36 + 32 = 68

7 0
3 years ago
An organization is deploying a new system to the production environment. A security analyst discovers the system is not properly
Alisiya [41]

Answer:

The best answer is A) A secure baseline was not established early in the process.

Explanation:

If the organization is deploying to the production environment and the security analyst discovers this risk at this point, then a secure baseline was not established, because it is impossible to successfully pass the coding and peer review instances by programmers and testing instances by the QA team without any warning to correct this problem.

5 0
4 years ago
Other questions:
  • Distinctly discuss the difference between the physical arrangement of computers as obtainable in the laboratory and a computer n
    15·1 answer
  • List seven basic internal components found in a computer tower
    13·1 answer
  • Which country does coriander come from
    11·2 answers
  • In reference to computer communications, what does the term noise mean?
    8·2 answers
  • What is the difference between arithmetic and logical operations​
    8·1 answer
  • Which of the following statements is true of content management systems?
    11·1 answer
  • Describe the difference between the circumscribed and inscribed options when using the AutoCAD Polygon command
    14·1 answer
  • What is the way to discover requirments for software projects ?
    14·1 answer
  • ما هي طرق اختبار الخرسانة <br>​
    14·1 answer
  • What is a "Top-Level Domain Name"?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!