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
sveticcg [70]
3 years ago
14

During the past decade ocean levels have been rising faster than in the past, an average of approximately 3.1 millimeters per ye

ar. Write a program that computes how much ocean levels are expected to rise during the next 15 years if they continue rising at this rate. Display the answer in both centimeters and inches.
Computers and Technology
1 answer:
Alecsey [184]3 years ago
4 0

Answer:

Program in Python is as follows:

rise = 3.1

for i in range(1,16):

     print("Rise in Year "+str(i))

     cm = rise * 0.1 * i

     inch = rise/25.4 * i

     print(str(cm)+" centimetres")

     print(str(inch)+" inches")

     print

Explanation:

This line initializes the rise of the ocean level

rise = 3.1

The following iterates from 1 to 15 (which stands for year)

<em>for i in range(1,16):</em>

   print("Rise in Year "+str(i))

This calculates the rise in each year in centimetre

   cm = rise * 0.1 * i

This calculates the rise in each year in inches

   inch = rise/25.4 * i

The line prints calculated ocean rise in centimetres

   print(str(cm)+" centimetres")

The line prints calculated ocean rise in inches

   print(str(inch)+" inches")

     print

You might be interested in
13. What is the suggested rpm on a hard drive for a laptop?
mario62 [17]
Usually it’s either 5400 or 7200RPM
3 0
3 years ago
Assume the following variable definition appears in a program:
AnnZ [28]

Answer:

cout << setprecision(2)<< fixed << number;

Explanation:

The above statement returns 12.35 as output

Though, the statement can be split to multiple statements; but the question requires the use of a cout statement.

The statement starts by setting precision to 2 using setprecision(2)

This is immediately followed by the fixed manipulator;

The essence of the fixed manipulator is to ensure that the number returns 2 digits after the decimal point;

Using only setprecision(2) in the cout statement will on return the 2 digits (12) before the decimal point.

The fixed manipulator is then followed by the variable to be printed.

See code snippet below

<em>#include <iostream>  </em>

<em>#include <iomanip> </em>

<em>using namespace std;  </em>

<em>int main()  </em>

<em>{  </em>

<em> // Initializing the double value</em>

<em> double number = 12.3456;  </em>

<em> //Print  result</em>

<em> cout << setprecision(2)<< fixed << number;  </em>

<em> return 0;  </em>

<em>}  </em>

<em />

4 0
3 years ago
Which one of the following statements most fully describes the general capabilities of desktop publishing software?
OleMash [197]
The answer is B.
<span> desktop publishing program must be able to take text and graphics from a number of sources and allow these elements to be arranged on a page. 
The main purpose of a destkop publishing program is to aid user in creating documents using its page layout so it could generate printable media with higher quality compared to the one that is handmade.</span>
7 0
3 years ago
Write an If/else statement to check whether host is online. If it is online, then print system is online otherwise print system
Reika [66]

Answer:

from socket import *

hostname = input('Enter the host to be scanned: ')

ip_add = gethostbyname(hostname)

connections = [ ]    

for i in range(133, 136):

   s = socket(AF_INET, SOCK_STREAM)

     

   conn = s.connect_ex((ip_add, i))

   print(conn)

   connections.append(conn)

if 0 in connections:

   print ('Host is online')

   s.close()

else:

   print ('system is unreachable')

Explanation:

The python source code above scans for all the available range of ports in the provided hostname, if any port is available, the host is online else the program print the error message "system is unreachable.

4 0
3 years ago
Can someone help: how to get binary?
xxTIMURxx [149]

Answer:

Explanation:

SENN KİMSİİİİİİİİN???

8 0
1 year ago
Read 2 more answers
Other questions:
  • 1. Engineers should not consult with experts if they do not know much about a problem.
    12·1 answer
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • What is the height of the tallest possible red-black tree containing 31 values?
    7·1 answer
  • andy accidentally saved a file in the wrong folder. what is the quickest way to move the file? create a new file and save it in
    8·2 answers
  • Written and artistic expressions are protected by
    8·1 answer
  • How to measure potential energy of a ball?
    14·1 answer
  • Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
    13·2 answers
  • How should you mark the query if it is a valid one?
    9·1 answer
  • Computer software is regarded a bridge between the hardware and software.elaborate the statement outlining types and functions o
    10·1 answer
  • Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lowe
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!