answer.
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
mezya [45]
2 years ago
14

Write a program that asks the user to input an integer that is a perfect square. A perfect square is an integer that is equal to

the product of another integer with itself; e.g., 16 is a perfect square because it equals 4 times 4. Repeatedly force the user to input a new integer until they enter a perfect square. Once the user has entered a perfect square, print its square root as an integer. Hint: you can modulo a float by 1 to get the decimal part of the float, e.g., 2.75 % 1 equals 0.75, and 5.0 % 1 equals 0.
Computers and Technology
1 answer:
BlackZzzverrR [31]2 years ago
3 0

Answer:

// program in python

# import math library

import math

#read input from user

num=int(input("enter an integer:"))

while True:

#find square root on input

   s_root=math.sqrt(num)

#find remainder of root

   r=s_root%1

#if remainder if 0 then perfect square

   if r==0:

       print("square root of the number is:",s_root)

       break

   else:

#if number is not perfect square then ask again

       num=int(input("input is not perfect square !!enter an integer again:"))

Explanation:

Read an integer from user.Find the square root of the input number and then find  the remainder of square root by modulo 1.If the remainder is 0 then number is perfect square otherwise ask user to enter an integer again until user enter a perfect square  number.

Output:

enter an integer:12                                                                                                        

input is not perfect square !!enter an integer again:16                                                                    

square root of the number is: 4.0    

You might be interested in
When using preventative insecticides which holiday period should trigger an application?
Savatey [412]
Spring break around Easter I would believe
4 0
2 years ago
Read 2 more answers
Widget Corp. wants to shift its list of inventory to a cloud so that its different branches can access it easily. The company ne
____ [38]

Answer:

The best cloud option for Widget Corp considering the cloud computing option should be cost-effective and should not expose mission-critical applications and data to the outside world.

Is a hybrid could.

Explanation:

The reasons behind this answer are that in the first place the cloud is not going to be fully managed by a third party, but also by the IT department of Widget Corp allowing it to control its security. Also, that the cloud can be adapted to public or mainstream sources, resources, and platforms. Making it very user friendly and lowering down specific knowledge to use it.

5 0
2 years ago
You learn that in a previous security breach at GearUp, a disgruntled employee destroyed the encryption key that had been used t
lukranit [14]

Answer:

The data can be safeguarded using key escrow procedure.

Explanation:

Key escrow basically means to store the cryptographic key in an "escrow" by a reputable trusted third party. The copy of the encryption key is kept with the third party. In case the cryptographic key gets lost or destroyed, then the key escrow service helps to access the encrypted data. It also manages the access control to the key in case the key gets lost. So this way in case of security breach at GearOn the key escrow service can be used to re-implement or access the key easily.

6 0
2 years ago
Write a program that allows you to create a file of customers for a company. The first part of the program should create an empt
ira [324]

Answer:

Explanation:good

7 0
2 years ago
What is the difference between paper size and page margins in Word?
sergij07 [2.7K]

Answer:

Paper size refers to the size of the paper you will be printing your document on, while page margins refer to the outside area of a page that can be made bigger or smaller to fit content.

Launch the Page Setup dialog box from the Page Setup group; in the Margins section, enter the page margin values and click OK.

All the statements are correct.

Right-click and add to dictionary

Type the words onto the first page of the document, and click on the Header button to repeat it on all of the other pages

pictures shapes and clipart

none of the above

Explanation:

7 0
2 years ago
Other questions:
  • What tool extends the basic functionality provided in task manager with additional features and tools?
    8·1 answer
  • Jamie is preparing a presentation on his laptop for his college annual event. He inserts audio and video files into the presenta
    11·2 answers
  • PHP is based on C rather than ______.
    5·1 answer
  • After experiencing several issues with an Active Directory domain controller, you have decided to perform a restore operation on
    10·1 answer
  • A client is asking for a printing solution that will print three sheets of paper with identical information on each page with a
    13·1 answer
  • What is printed by the following program provided all necessary standard header files are included? Explain each line of the out
    10·1 answer
  • Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
    13·2 answers
  • In Java please:
    8·1 answer
  • Exercise 3: Function Write a function named word_count that accepts a string as its parameter and returns the number of words in
    10·1 answer
  • PLEASE AWNSER 50 POINTS PLUS BRAINLEST ILL FAIL MY GRADE IF I DONT AWNSER IN A HOUR!
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!