Answer:
In Python:
N = int(input("Positive integer: "))
if N > 0:
flag = False
for i in range(1,N+1):
if i * i == N:
flag = True
break
print(str(flag))
else:
print("Positive integer only")
Explanation:
N = int(input("Positive integer: "))
If the number is positive
if N > 0:
This initializes a boolean variable to false
flag = False
This iterates from 1 to the input integer
for i in range(1,N+1):
This checks if th number is a square of some integer
if i * i == N:
If yes, flag is set to true
flag = True
The loop is exited
break
This prints either true or false, depending on the result of the loop
print(str(flag))
If otherwise, that the number is not positive
<em>else:</em>
<em> print("Positive integer only")</em>
Answer:
Overcoming Fear
Explanation:
Given that a movie theme stimulates a universal human ordeal and at the same time, Piper is a short animated movie that was released in 2016. The fundamental idea of the movie is about a baby sandpiper who has to survive and conquer his anxiety and phobia of the water.
Hence, in this situation, the theme that could come from Piper's feelings and action is OVERCOMING FEAR
Answer:
C. Hardware resources are dynamically allocated as use increases.
Explanation:
Cloud computing is a technique organisations to store and retrieve resources in a remote central database with secure access over the internet. It is able to access large data storage resources that would have cost more if they had implemented one for themselves.
A database or data centre is a online group of servers that is in a subscribed service to authorised users. Storage hardware allocation is dynamic to users, which means that another storage location in issued on every duration of subscription, making it easy to add more storage infrastructure. This defines the scalability of data centres.
Answer:
See explaination
Explanation:
class Taxicab():
def __init__(self, x, y):
self.x_coordinate = x
self.y_coordinate = y
self.odometer = 0
def get_x_coord(self):
return self.x_coordinate
def get_y_coord(self):
return self.y_coordinate
def get_odometer(self):
return self.odometer
def move_x(self, distance):
self.x_coordinate += distance
# add the absolute distance to odometer
self.odometer += abs(distance)
def move_y(self, distance):
self.y_coordinate += distance
# add the absolute distance to odometer
self.odometer += abs(distance)
cab = Taxicab(5,-8)
cab.move_x(3)
cab.move_y(-4)
cab.move_x(-1)
print(cab.odometer) # will print 8 3+4+1 = 8