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
Nadusha1986 [10]
3 years ago
15

Write a program that prompts the user to enter two positive integers a and b with a < b and then prints the list of all the p

erfect squares that are between a and b, inclusive
Computers and Technology
1 answer:
Debora [2.8K]3 years ago
5 0

Answer:

Written in Python

import math

a = int(input("a: "))

b = int(input("b: "))

for i in range(a,b+1):

    sqqrt = math.sqrt(i)

         if int(sqqrt + 0.5) ** 2 == i:

              print(i,end=' ')

Explanation:

This line import math library

import math

This line prompts user for user input (a)

a = int(input("a: "))

This line prompts user for user input (b)

b = int(input("b: "))

This iterates from a to b (inclusive)

for i in range(a,b+1):

This checks for perfect square

<em>     sqqrt = math.sqrt(i)</em>

<em>          if int(sqqrt + 0.5) ** 2 == i:</em>

This prints the number if it is a perfect square

              print(i,end=' ')

You might be interested in
Complex calculations show that if the universe is geometrically flat, we should observe the greatest temperature differences bet
Rufina [12.5K]

Answer:

Answer is 1 degree.

Explanation:

W MAP stands for Wilkinson Anisotropy Probe which was working from 2001 to 2010 .It usually measured the temperature differences.Big Bang was a partnership with NASA and Princeton University. So if universe is geometrically flat we should observed that temperate between patches are separated by 1 degree.Because Universe is oval shape and contain 360 angular shape but if it goes flat we can see the patches at very low distance that is 1 degree.

7 0
4 years ago
With the Linux operating system, its open source design means it can be used, modified and ______
nadya68 [22]

Answer:

distributed.

Explanation:

Because Linux is released under an open source license, which prevents restrictions on the use of the software, anyone can run, study, modify, and redistribute the source code, or even sell copies of their modified code, as long as they do so under the same license.

3 0
3 years ago
Select the characteristics that describe the evolution of computers that predate the personal computer (select all correct answe
emmasim [6.3K]

Answer:

Options (a), (b) and (d)

Explanation:

  • Option (a) is true that the computers have become smaller and smaller with advancement of the technology. The earlier version of computers used vacuum tubes and are very big in size.
  • As the years passed and due to the advancement of the transistors the computers have become smaller in size.
  • Option (b) is true. With the advancement in the research in circuits used in the computer like Integrated Circuits the computers have become faster.
  • The response time of the operating system has reduced drastically.
  • Option (c) is wrong option. The computers have become cheaper. The transistors are cheaper compared to the vacuum tubes which are used in the earlier computers.
  • The price of the same computer (memory and time efficiency) has become less in the coming years than in the previous years with the advancement in the research of transistors.
  • Option (d) is true. Now-a-days computers support more and more number of applications. Computers has more number of applications in various and diversified fields.
  • With the advancements in the computers, the computers are finding more applications in different fields like medicine, law, transport industries etc.
5 0
4 years ago
What is the number base of the binary number system?
Margarita [4]

Answer:

2

Explanation:

The system only uses 2 numbers which are 0 and 1 instead of the usual 10 numbers; 0, 1, 2, 3, 4, 5, 6, 7, 8 & 9.

4 0
1 year ago
Write a Java code statement for each of following:
Naddik [55]

Answer:

double decimal1, decimal2;

int whole;

Explanation:

Required

Declare 2 decimals and 1 int.

The syntax to declare a variable is:

<em>data-type variable-name;</em>

To declare decimal, we simply make use of double or float data types.

So, we have:

double decimal1, decimal2; ----> for the decimal variables

And

int whole; ---- for the whole number

6 0
3 years ago
Other questions:
  • D-H public key exchange Please calculate the key for both Alice and Bob.
    12·1 answer
  • How do I cancel my subscription
    14·2 answers
  • Write a program that reads from user (i) an hour between 1 to 12 and (ii) number of hours ahead. The program should print the ti
    15·1 answer
  • Where is help on this system?
    7·2 answers
  • true or false? spreadsheets provide more options for graphical representation of the data than databases​
    6·1 answer
  • Which of the following is NOT a design choice when using the ER model?
    5·1 answer
  • The variable most_recent_novel is associated with a dictionary that maps the names of novelists to their most recently published
    12·1 answer
  • Write the correct word to complete the sentence:
    7·1 answer
  • int FindFirstCharFrom(char* str, char *sought); The function FindFirstCharFrom takes pointers to two C strings as arguments, str
    13·1 answer
  • What is tha length of Mac address ?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!