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
VikaD [51]
3 years ago
13

A and B have same output or not? A B x=0 x=0 do do x<3 x=x+1 x=x+1 print x print x while x<3 while

Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
6 0

Answer:

A and B have different output:

A output will be 1

B output will be 123

Explanation:

A

X = 0

do x < 3

x = x+1

print x

while

B

X = 0

do x = x+ 1

print x

while x < 3

For statement A the condition statement which suppose to be after "while" is not set therefore the value of x will be printed.

For statement B the condition statement is set "x < 3" in front of "while" thereby result in iteration until the condition is false.

Statement A output will be 1

Statement B output will be 123

You might be interested in
What is a trojan horse in computer science?
Firdavs [7]

Answer:

type of malware that is often disguised as legitimate software. Trojans can be employed by cyber-thieves and hackers trying to gain access to users' systems. Users are typically tricked by some form of social engineering into loading and executing Trojans on their systems.

Explanation its malware

4 0
2 years ago
What is the next line?
jonny [76]

Answer:

Answered below

Explanation:

The next line is 1.

The python count function returns the number of times an element appears in a tuple or a list.

In the tupleB tuple, 7 is passed into the count function. The number of times 7 appears in tupleB is just once alongside 5, 2.7, 10 and 5. Therefore, the count function returns 1 in the next line.

5 0
2 years ago
(in PYTHON) Write a function in REPL.it that uses three parameters, and squares the first, calculates mod 5 of the second parame
tatiyna

Answer:

I wrote this myself, it should be working. I think this is what the instructions were looking for.

The code below should return

Squared: 1296  

Mod: 0        

Quadrupled: 16

Explanation:

def threeParams(squared, mod, quadruples):

   array = [squared, mod, quadruples]

   array[0] = squared ** 2

   array[1] = mod % 5

   array[2] = quadruples * 4

   return array

valueArr = threeParams(36, 15, 4)

print(f"Squared: {valueArr[0]}\nMod: {valueArr[1]}\nQuadrupled: {valueArr[2]}")

4 0
2 years ago
Is it bad to leave external hard drive on for hours
alexandr402 [8]
Yes, because it can cause fires and electrical problems
8 0
3 years ago
Which of the following is NOT a name of one of the central features of Facebook? Timeline Activity Log Graph Search Daily News
Thepotemich [5.8K]
I think it's Graph Search because there isn't any graphs in Facebook. That is my opinion. I don't use social media.
4 0
3 years ago
Other questions:
  • Filtering of packets as they leave the network destined for the internet is called ____________ .
    13·1 answer
  • What is a benifit of having a client/server network?
    6·1 answer
  • Research at least two articles on the topic of managerial issues of a networked organization. Write a brief synthesis and summar
    8·1 answer
  • How does the teacher know you have completed your assignment in Google Classroom?
    12·1 answer
  • If I use google incognito mode or a throwaway google account can my search history be tracked by Microsoft parental controls?
    7·1 answer
  • How to delete Brainly account ?​
    12·1 answer
  • In which conditions, a trial balance does not tally?
    14·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
  • Jonah wants to type an assignment using Word. Arrange the steps he needs to follow in the correct order.?
    13·1 answer
  • What kind of company would hire an Information Support and Service employee?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!