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
Anastaziya [24]
3 years ago
6

What is the output of: print (8 % 4)

Computers and Technology
1 answer:
elena-s [515]3 years ago
5 0

Answer:

0

Explanation:

The statement, print(8 % 4) will produce the output 0 ;

The print statement is an inbuilt function which is used to output a typed string or display result of a Mathematical calculation and so on.

The expression in the print statement gives 0;

8%4 means, the remainder when 8!is divided by 4 ; 8 /4 gives 2 without a remainder. Meaning that :

8%4 = 0

Hence, print(8 % 4) = 0

You might be interested in
How to understand amortized analysis potential?
MA_775_DIABLO [31]
Since you gave kind of a vague question. I'll just go with the basics. Amortized analysis in computer science is basically the study of worst case run times regarding a sequence of operations.

When looking at potential, it is the physicist's method.
phi (initial state) =0 and every state after is larger than 0.
It keeps track of time but relies on states to know where it is.

The equation C +phi (state')-phi(state) is the main equation. C is the time for an operation, "state" is before and "state'" is after.

There are sets of equations that dictate average run time with this.

ex.
phi (H)= 2n-m. n=number of elements, m=size of array.
This equation is used to calculate the time to double the size.
4 0
3 years ago
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
Mashcka [7]

Answer:

Following are the code to this question:

def binarynumber(num):#defining a method binarynumber that accepts a parameter num

   x=""#defining a string variable x

   if (num!=0):#defining if condition to check number not equal to 0

       while (num>=1):#defining a loop that check value is grater then equal to one

           if (num %2==0):#defining if condition to check num is even

               x=x+"0" #add string value 0 in num variable

               num=num/2 #divide the value by 2

           else:#defining else block

               x=x+"1"#add string value 1 in num variable

               num=(num-1)/2#first subtract 1 into num variable then divide the value by 2

   else:

       x="0"#assign string value 0 in num variable  

   return "".join(reversed(x))#return value

num = int (input ("Enter any number: "))#defining num variable that input the integer value

print (binarynumber(num))#using print method to call method binarynumber with passing num parameter

Output:

Enter any number: 12

1100

Explanation:

  • In the above python code a method "binarynumber" is declared, in which the "num" variable passes as the parameter inside the method a string variable "x" is declared that stores all converted values.
  • Inside the method and if the block is declared that checks number value is not equal to 0 if this condition is false then it will add string value and reverse its value.
  • Or if the condition is true it defines a while loop that calculates the given number binary digits and returns its value.
  • At the last step, the num variable is declared that inputs the integer value from the user end and calls the method by using the print method.    
6 0
3 years ago
Which social media post indicates your home may be unattended?
victus00 [196]

Answer: A

Explanation:

It clearly shows your out

8 0
3 years ago
What hand glove is used to prevent electric shock and why​
Ostrovityanka [42]

Answer:

Insulated gloves because their made of synthetic rubber.

Explanation:

7 0
3 years ago
Read 2 more answers
A developer working on a time management application wants to make total hours for each timecard available to application users.
Llana [10]

Answer:

The correct option to the following question is A.) .

Explanation:

A Timecard is an application which is used for recording the times the user is working and it is an application for record the time upon logging in to the Web Timesheet, a user punches out and into the mark time they stop and start the works, along with the any comment they choose to enter.

3 0
3 years ago
Other questions:
  • Why don't we get together to watch the Academy Awards?
    15·2 answers
  • How do I connect my CSS file and HTML page together? it's just not wanting to work for me. 
    5·1 answer
  • A directional antenna issues wireless signals along a(n) ____ direction.
    9·1 answer
  • Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)int[] a = {1, 3, 7, 0, 0,
    6·1 answer
  • The___provides access to the internet; may also be internal
    11·1 answer
  • What does the CFO of a company do
    14·1 answer
  • Mention the generation we have in computer​
    7·1 answer
  • The Curtis Publishing Company's early marketing research efforts mainly had to do with _____. people who drove automobiles peopl
    10·1 answer
  • Group of programs are software <br>​
    11·1 answer
  • Why does python code generate fewer types of syntax errors than code in other programming languages?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!