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
JulsSmile [24]
3 years ago
11

Write a multi-way if statement that compares the double variable pH with 7.0 and makes the following assignments to the bool var

iables neutral, base, and acid:
Computers and Technology
1 answer:
Masja [62]3 years ago
4 0

Answer:

try:

   pH = float(input("Enter number between 0 to 14: "))

except ValueError:

   print("input must be a number")

if pH < 7:

   print("pH is Acidity")

elif pH == 7:

   print("pH is neutral")

else:

   print("pH is Base/alkaline")(

Explanation:

The try and except statement is used to check if the input is a number, if its not, the print statement is displayed. The nested if statement compares the pH input to know if it is an acid, base or neutral.

You might be interested in
What steps can be used to password-protect a worksheet?
muminat

Answer:

Review

Changes

Protect sheet

Explanation:

I did it

8 0
3 years ago
Bunch of points!!!!!!! help pls
alex41 [277]
Most likely B. Photographs.

Hope this helps!

Have a good day!
4 0
3 years ago
Read 2 more answers
Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
posledela

Answer:

#include <iostream>

using namespace std;

double DrivingCost(int drivenMiles,double milesPerGallon,double dollarsPerGallon)

{

   double dollarsperMile=dollarsPerGallon/milesPerGallon;//calculating dollarsperMile.

   return dollarsperMile*drivenMiles;//returning thr driving cost..

}

int main() {

double ans;

int miles;

cout<<"Enter miles"<<endl;

cin>>miles;

ans=DrivingCost(miles,20.0,3.1599);

cout<<ans<<endl;

return 0;

}

Output:-

Enter miles

10

1.57995

Enter miles

50

7.89975

Enter miles

100

15.7995

Explanation:

In the function first I have calculated the dollars per mile and after that I have returned the product of dollarspermile and driven miles.This will give the cost of the Driving.

4 0
3 years ago
#5 Multiple Select Which of the following describes a hardware error? Select 3 options.
DENIUS [597]

Answer:

A, E

Explanation:

Hope this is correct

7 0
3 years ago
Read 2 more answers
What does FIFO mean?
zubka84 [21]
Hello there!

It is First In First Out

Hope This Helps You!
Good Luck :)
6 0
3 years ago
Read 2 more answers
Other questions:
  • HURRYYY A friend of yours has E-mailed their English paper to you so that you can proofread it. Explain the tools you would use
    15·1 answer
  • What is the penalty for refusing to submit to alcohol testing (drivers ed)
    7·2 answers
  • Does a BIOS reset erase data such as pictures, programs or other things like that?
    13·1 answer
  • write a program to update the rate by increasing 20% from sequential data file "items.dat" that store item name.rate and quantit
    15·1 answer
  • The act of illegally copying software, music,or movies that are copied protect?
    7·2 answers
  • The advancements in which of the following technologies has most changed the American job market in recent years?
    14·2 answers
  • Identify two real-world examples of problems whose solutions do scale well
    13·1 answer
  • Write code which takes two inputs from the user, a number of sides followed by a side length, then creates a regular polygon wit
    10·2 answers
  • Write a function called play_round that simulates two people drawing cards and comparing their values. High card wins. In the ca
    11·1 answer
  • _is the joining of two or more electrical conductors by mechanically twisting the conductors together or by using a special spli
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!