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
mars1129 [50]
3 years ago
6

Add a single line comment same as before that states you are doing calculations.

Computers and Technology
1 answer:
Semenov [28]3 years ago
3 0

Answer:

//  you are doing calculations.

Explanation:

Here we add the single line comment i.e you are doing calculations by // forward slash. If you are making a comment more then the single line its better to use /* comments statements */.

For example:  

/* print welcome on screen  

print in nextline */

Following are the program in c++ language.

#include<iostream> // header file

using namespace std; // namespace

int main() // main method

{

int a=9,b=89; // variable declaration

//  you are doing calculations.

 int c=a+b;  

  cout<<c; // display c

   return 0;

}

Output:98

You might be interested in
You have been hired by an educational software company to create a program that automatically calculates the sum of each place-v
Vinvika [58]

Hi, you haven't provided the programing language, therefore, we will use python but you can extend it to any programing language by reading the code and the explanation.

Answer:

n1 = int(input("First numeber: "))

n2 = int(input("Second numeber: "))

for i in range(5):

   r1 = n1%10

   r2 = n2%10

   print(r1+r2)

   n1 = n1//10

   n2 = n2//10

 

Explanation:

  1. First, we ask for the user input n1 and n2
  2. We create a for-loop to calculate the sum of each place-value of two numbers
  3. We obtain the last number in n1 by using the mod operator (%) an the number ten this way we can always take the last value, we make the same for n2
  4. Then we print the result of adding the last two numbers (place value)
  5. Finally, we get rid of the last value and overwrite n1 and n2 to continue with the process

4 0
3 years ago
For the question below, refer to the following recursive factorial method.
Mashcka [7]

Answer:

(d) 6

Explanation:

When we call factorial(3) first it will check if it greater than 1 since it is greater then return 3*factorial(2) will be called on factorial(2) it will again check that 2>1 since it is greater then return 2*factorial(1) will be called.In factorial(1) we have is not greater than 1 so it will return 1.return 2*factorial(1) will return 2 and 2 that is returned by factorial(2) will be multiplied with 3.So it will return 6.

8 0
4 years ago
A) How could you modify Shelve with a technique discussed in class so that you can create Shelve instances that contain // Tools
Kay [80]

Answer:

See explanation

Explanation:

A “shelf” is a dictionary-like object. A shelf is an arbitrary Python objects, that is; anything that the pickle module can handle. This includes recursive data types and objects containing lots of shared sub-objects. It must be noted that the keys are ordinary strings.

(A). modification to Shelve can be done by following this instructions;

(1). Do not redefine built-in functions,(2). grab shelved item, mutate item, write mutated item back to shelf.

The number (2) instructions is during iteration over shelved items.

(B). CREATING FUNCTIONS THAT TAKES IN TWO SHELVES;

import shelve

d = shelve.open(filename) # open -- file may get suffix added by low-level

# library

d[key] = data # store data at key (overwrites old data if

# using an existing key)

data = d[key] # retrieve a COPY of data at key (raise KeyError if no

# such key)

del d[key] # delete data stored at key (raises KeyError

# if no such key)

flag = key in d # true if the key exists

klist = list(d.keys()) # a list of all existing keys (slow!)

# or, d=shelve.open(filename,writeback=True) would let you just code

# d['xx'].append(5) and have it work as expected, BUT it would also

# consume more memory and make the d.close() operation slower.

d.close() # close it

3 0
4 years ago
Write a program that reads in ten numbers from the user and displays the distinct numbers. If a number entered by the user appea
Jobisdone [24]

Answer:

Here you go :)

Explanation:

Change this however you'd like:

array = []

for n in range(10):

   x = int(input("Enter integer: "))

   array.append(x)

dup = set(array)

print(", ".join(str(i) for i in dup))

7 0
3 years ago
​
mash [69]

Answer:

Hey mate......

Explanation:

This is ur answer....

<em>For many users, uploading files is quite a bit slower than downloading files. This is usually normal, because most high-speed Internet connections, including cable modems and DSL, are asymmetric — they are designed to provide much better speed for downloading than </em><em>uploading.</em>

Hope it helps!

Brainliest pls!

Follow me! ;)

5 0
3 years ago
Other questions:
  • Gross Domestic Product is equivalent to which of the following?
    13·1 answer
  • PLZ HELP ME!!!
    13·1 answer
  • A(n) ____________ specifies a variable's name and data type.
    5·2 answers
  • Melinda completed the Computer Programming Aptitude Test when she applied for a position with Beta Electronics. Six months later
    14·1 answer
  • The loop body instructions in the _____ statement always are processed at least once.
    6·1 answer
  • Which category of management information systems (MIS) combines the forecasting capability of decision support software with the
    12·1 answer
  • What gaming PC should I get
    14·2 answers
  • What is the name given to software that decodes information from a digital file so that a media player can display the file? har
    11·1 answer
  • What do we call a statement that displays the result of computations on the screen
    12·2 answers
  • Tick (/) the correct answers.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!