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
Tom [10]
2 years ago
8

Guess the output of this code:print( (3**2)//2 )

Computers and Technology
1 answer:
V125BC [204]2 years ago
6 0

Answer:

Assuming that's in python, the answer would be 4

Explanation:

The ** operator is for raising a number to a power.

The // operator returns the number of times the right number can fit into the left (i.e round division).

So the answer would be three squared over two rounded down, or 4.

You might be interested in
Privacy, anonymity, and freedom of expression are all interrelated.
Andre45 [30]

Answer:

Criminals (terrorists).

Explanation:

6 0
2 years ago
Modify the countUp( ) you wrote in the previous question to countUp( num), where num is a parameter. The function displays from
algol [13]

Answer:

void countUp(int num)

{

   if(num==0) //base case.

   return;

   countUp(num-1);//Recursive call.

   cout<<num<<" "; //printing the number.

}

for input num=25

Output:-1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Explanation:

I have used recursion to print the numbers the function is in c++ language.In every recursive call we are decreasing num by 1.As the base case is reached.Then it will backtrack from 1 to num and then we are printing while backtracking.

4 0
3 years ago
Software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundam
alukav5142 [94]

Answer:An operating system, or "OS," is software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundamental files your computer needs to boot up and function.

Explanation:

8 0
2 years ago
For this lab you will do 2 things:
zepelin [54]

Answer:

Here is the Python program:

COOKIES_PER_BAG = 40 #sets constant value for bag of cookies

SERVINGS_PER_BAG = 10 #sets constant value for serving in bag

CALORIES_PER_SERVING = 300 #sets constant value servings per bag

cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user

print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed

Explanation:

The algorithm is:

  • Start
  • Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
  • Set COOKIES_PER_BAG to 40
  • Set SERVINGS_PER_BAG to 10
  • Set CALORIES_PER_SERVING to 300
  • Input cookies
  • Calculate totalCalories:                                                                                                                       totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
  • Display totalCalories

I will explain the program with an example:

Lets say user enters 5 as cookies he or she ate so

cookies = 5

Now total calories are computed as:

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));  

This becomes:

totalCalories = 5 * (300/40/10)

totalCalories = 5 * (300/4)

totalCalories = 5 * 75

totalCalories = 375

The screenshot of program along with its output is attached.

4 0
3 years ago
Which unit of computer is used to processed data?​<br>Please help!!!!!!
RoseWind [281]

Hello There!

AnimeVines is here!

Is it Central Processing Unit?

HopeThisHelps!!

AnimeVines

7 0
2 years ago
Read 2 more answers
Other questions:
  • Is a software program that allows users to access the world wide web
    10·1 answer
  • Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: Inv
    5·1 answer
  • An IP address in the form 197.169.100.1 is called a(n) ________. dotted quad encryption key random number sequential access numb
    7·1 answer
  • Which of the following is a computerized job classification system that contains continually updated information regarding the k
    15·1 answer
  • Cloud computing is an old phenomenon in computing infrastructure dating back to the early days of the Internet that involves mov
    10·1 answer
  • Usually it is a rectangular box placeed or underneath your desk​
    15·1 answer
  • Differences between dot_mattix printer and a line printer
    12·1 answer
  • A user calls to complain that her computer is behaving erratically. Some days it functions correctly, and other days, it crashes
    15·1 answer
  • Why do designers of smartphones hide computer processing details from
    14·2 answers
  • Do you guys answer questions about cyber security?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!