Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k's value is smaller than m's. Write the code necessary to compute the number of perfect squares between k and m. (A perfect square is an integer like 9, 16, 25, 36 that is equal to the square of another integer (in this case 3*3, 4*4, 5*5, 6*6 respectively).) Associate the number you compute with the variable q. For example, if k and m had the values 10 and 40 respectively, you would assign 3 to q because between 10 and 40 there are these perfect squares: 16, 25, and 36,.

PYTHON CODING

Answers

Answer 1

Answer:

import math  

def isPerfectSquare(n):

 s = int(math.sqrt(n))

 return n == s*s

def countPerfectSquares(k,m):

 q = 0

 for i in range(k,m):

   if isPerfectSquare(i):

     q=q+1

 return q

print(countPerfectSquares(10,40))

Explanation:

Note that this is including the k, but excluding m. If you want to include m, write m+1 in the range expression.


Related Questions

You are planning a program to find the maximum heart rate recommended for patrons of a gym where you have a part-time job. One formula for calculating the maximum heart rate is the difference between 220 and the patron’s age. Some of the steps in your plan are below.

Put them in order of which occurs first. Some steps are not listed.

Answers

Answer:

Age = int(input(Enter your age? "))

print(f"Your maximum heart rate is {220 - age}.")

Explanation:

The programs will be as follows

Age = int(input(Enter your age? "))

print(f"Your maximum heart rate is {220 - age}.")

 

Answer:

got 100 on the quiz

Explanation:

there are 2048bytes in4megabytes true or false​

Answers

Answer:

FALSE IS THE ANSWER.

I HOPE IT IS HELPFUL

What is missing in this list of information needed to cite a book?
Author, title, date, publisher
A. page numbers
B. author’s name
C. city and state where it was published
D. author’s sources

Answers

Answer:

C. City and state where it was published

Explanation:

#CarryOnLearning

[tex]{hope it helps}}[/tex]

The one that is missing in the list of information given is author’s sources. The correct option is D.

What is citation?

A "citation" is the way you tell the readers that some of the information in your work came from another source.

It also provides your readers with the information they need to locate that source on the reference or Works Cited page. A citation must be enclosed by parentheses.

It properly credits the authors of the phrases or concepts that you used in your paper. It enables those reading your work to find your sources and learn more about the ideas you present in your paper.

In the given list to cite a book, i.e. Author, title, date, publisher, the one that is missing and should be incorporated is author's source.

Thus, the correct option is D.

For more details regarding citation, visit:

https://brainly.com/question/1272936

#SPJ2

i have a question about Razer headsets. Is it possible to mix microphones? For example:
I have an "Electra V2" headset and microphone and I want to change it's microphone to Kraken.
Is it possible?​

Answers

Answer:

In theory yes it is gonna be pretty hard but it is very possible

I need help in raft survival ocean nomad I was traveling and now I can't enter the island or go back home (raft). Please help me

Answers

Answer:

Raft Survival : Ocean Nomad is a survival game

Explanation:

The raft survival ocean nomad is a survival video game that is developed by a Swedish developer,  Redbeet Interactive. This game is published by Axolot Games.

In the game the player is moving in a raft in the middle of an ocean searching for his family. It is a survival and strategy game. The player needs to survive in the deserted ocean by whatever he finds and collect from the ocean and also protect himself from the attacks of the sharks.

The player moves by a small island which he can explore to eat something or collect other items to developed his raft.

In the context, if you can not enter the island or go back to the raft, then save the game at that point and press the escape button to start from the first.

In this way, you can refresh the game and start he game again to enter the island.

rem wap a programe using function procedure to calculate simple interest

Answers

Answer:

The program in Python is as follows:

def interest(P,R,T):

    [tex]I = P * R * T/100[/tex]

   return I

   

P = float(input("Principal: "))

R = float(input("Rate (%): "))

T = float(input("Time (years): "))

print(interest(P,R,T))

Explanation:

Required

Simple interest program using function

This defines the function

def interest(P,R,T):

This calculates the simple interest

   [tex]I = P * R * T/100[/tex]

This returns the calculated interest

   return I

The main begins here

These get inputs for principal, rate and time

P = float(input("Principal: "))

R = float(input("Rate (%): "))

T = float(input("Time (years): "))

This calls the interest function

print(interest(P,R,T))

An attacker has been successfully modifying the purchase price of items purchased at a web site. The security administrators verify the web server and Oracle database have not been compromised directly. They have also verified the IDS logs and found no attacks that could have caused this.
What is the mostly likely way the attacker has been able to modify the price?
A. By using SQL injection
B. By changing hidden form values in a local copy of the web page
C. By using cross site scripting
D. There is no way the attacker could do this without directly compromising either the web server or the database

Answers

the correct answer is b

use of concave mirrors​

Answers

Explanation:

concave lens use for shaving mirrors and satellite

Help me plzzzz ASAP T-T and it's Cyber Security but my last day of school is tomorrow and I'll graduate in June 24 so plzzzzz I really need correct answer ASAP

What kinds of people do you think are susceptible to being duped by "phishing" attacks?

Answers

Answer:

Find answers below.

Explanation:

Social engineering can be defined as an art of manipulating people, especially the vulnerable to divulge confidential information or performing actions that compromises their security.

Basically, it is a manipulative strategy or technique that involves the use of deceptive and malicious activities on unsuspecting victims in order to gain unauthorized access to their confidential or private information for fraud-related purposes. Some examples of social engineering attacks include quid pro quo, spear phishing, baiting, tailgating, water-holing, vishing, pretexting, phishing, etc.

Phishing is simply a form of cyber attack which typically involves making an attempt to obtain sensitive user informations such as usernames, passwords and credit card details or bank account details by disguising one's self as a trustworthy entity in an electronic communication usually over the internet.

Generally, the type of people who are susceptible to being duped by "phishing" attacks are those who post or share their email address or contact informations on public forums and don't scrutinize and examine a message before acting on it.

In conclusion, phishing is a type of fraudulent or social engineering attack used to lure unsuspecting individuals to click on a link that looks like that of a genuine website and then taken to a fraudulent web site which asks for personal information.

Answer:

what do you look like?

what is the most important/powerful computer in a typical network?​

Answers

Answer:

A network server is a computer that provides various shared resources to workstations and other servers on a computer network. They are built with more powerful components than individual workstations

Cora is writing a program to make a motorcycle racing game. If Cora wants to speed of the motorcycle to appear on the screen when the game is played, then Cora needs to add something to the code that will make the speed

Answers

Answer: C. Boolean value

Explanation:

The options are:

A. input

B. output

C. Boolean value

D. conditional statement

Boolean data type refers to the data type which possesses two values which are true and false which shows two truth values of values.

The boolean expression results in a boolean value. Based on the question given, then the answer will be Boolean value. Therefore, the correct option is C.

Answer:

c

Explanation:

sorry if I was wrong

help please asap please l​

Answers

Answers:

(a) Processor type

(b) Processor speed

(c) Display size

(d) Resolution

(e) Drive size

(f) Memory size

(g) Memory type

(h) Available interfaces

(i) Operating system

(j) Utilities

♛ Mark me as Brainliest if I’m right

The lines that can be formatted to display on the edges of cells are called _______.

style lines
edge lines
borders
underlines

Answers

Answer:

borders

Explanation:

Borders can be formatted in cells of excel or goog.le sheets. You can change width, shape, color, and whole plethora of things!

The lines that can be formatted to display on the edges of cells are called [tex]\boxed{ borders . }[/tex]

a. style lines

b. edge lines

c. borders

d. underlines

[tex]\large\mathfrak{{\pmb{\underline{\orange{Mystique35 }}{\orange{❦}}}}}[/tex]

suggest a reason why it was constructed there?​

Answers

Can you post the work assigned so I can better understand?

Convert the algebraic expression below to C++ statement Do not use the pow function. Ans = 5x^2 + 15k + y^-2

Answers

Answer:

The C++ statement for the given algebraic expression 5x^2 + 15k + y^-2 is ( ( 5 * ( x * x ) ) + ( 15 * k ) + ( 1 / ( y * y ) ).

Explanation:

To convert the given algebraic expression 5x^2 + 15k + y^-2 into the C++ statement without using the pow function is:

In the given algebraic expression, there are three expressions combined using the + operator.

The first algebraic expression is 5x^2.

Here, x has a power of 2, and 5 is multiplied by the result of x^2. x having the power of 2 means x is multiplied itself twice. The C++ statement for this algebraic expression is (5 * ( x * x)).

The second algebraic expression is 15k.

Here, 15 is multiplied by k. The C++ statement for this algebraic expression is (15 * k).

The third algebraic expression is y^-2.

Here, x has a power of -2. it means [tex]1/y^{2}[/tex].  The C++ statement for this algebraic expression is (1/ (y * y).

The combination of all the three C++ statement is (5 * ( x * x)) + (15 * k) + (1/ (y * y).

I love science its my favorite subject

Answers

Answer:

Nice!

Explanation:

i like physics and biology :)

Answer:

I also love science!!

Explanation:

Two devices used by the supermarket point-of-sale (POS) terminal are a bar code reader and a keyboard. Name two other input/output devices used at the POS and give a use for each device.

Answers

Answer:

1. Receipt printer

Use of receipt printer:

i. They are used to print customer transaction receipts for proof.

2. Touch screen monitor

Use of touch screen monitor:

i. Allow record of when, where, price, and other important information about the sale conducted.

Explanation:

A Point of sale (POS) terminal takes record of transactions at the point where a product is purchased or a service is rendered. A barcode reader is a price scanner that is an input device used in a point-of-sale (POS) terminal. The keyboard is also an input device. The receipt printer is an output device since it converts information into a readable format. While only a touch screen monitor among the other devices mentioned above is an input and output device, because of its touch panel and its ability to display information.

             

What are the best editing apps?

Answers

Answer:

Snapseed, Lightroom, Adobe Photoshop, Prisma, Bazaart, Photofox, VSCO and PicsArt.

Explanation:

Snapseed, Lightroom, Adobe Photoshop, Prisma, Bazaart, Photofox, VSCO and PicsArt are the best editing apps. Some of the apps are present as free while some of them are not available without paying money for it. These are the top best editing apps so you can use it anyone of it. Snapseed is free on iOS and Android whereas Lightroom needs $5 per month for full access. Adobe Photoshop is also free on iOS and Android.

Answer:

After effects or alight motion on mobile are pretty good

Explanation:

i read the book_____you gave me last month​

Answers

Answer:

You didn't provide any answer choices therefore I shall provide some that make sense with the sentence.

that

which

I hope these answers were of any help to you.

I read the book THAT/WHICH you gave me last month.

Data bars are a form of ________.

data input
conditional formatting
data calculations
data formatting

Answers

Answer:

Hello There!!

Explanation:

The answer is conditional formatting.

hope this helps,have a great day!!

~Pinky~

Answer:

conditional formatting

Explanation:

hopes it helps

benefits of Internet in modern means of transport benefit of Internet as modern method of information transmission ​

Answers

Answer:

It is a network through which individuals transfer data and information. Using the internet, you can conduct financial services

In cell K2 enter a formula using the IF and OR functions, as well as structured references, to determine if Adam Moriarty can be a group leader. a. The IF function should first determine if the staff member’s Service Years is greater than 3 OR if the staff member’s college graduate status is "Yes". Remember to use a structured reference to the Service Years and the College Graduate columns.

Answers

Solution :

The value of the K2 cell is filled by IF and OR functions with structured references as :

[tex]K2=IF(OR([CBF\ \text{Staff[ Service years]} > 3, \text{CBF Staff[College graduate]}="Yes"),"Yes","No")[/tex]

Now if the syntax of the formula is not provided, then we can use :

[tex]$K2=IF(OR([[\text{Service Years}]]>3,[[\text{College Graduate}]]="Yes"),"Yes","No")$[/tex]

The staff member are required to satisfy one of the two or both the conditions so as to become a group leader. The conditions are :

---   staff member should served for more than 3 years

--- staff members should be college graduate

Which of the following negatively impacts the readability of a web page?
ОА.
a mix of serif and sans-serif fonts
OB.
too many hyperlinks
O c.
the use of a single font for the entire page
D.
the use of italicization for emphasis

Answers

Answer:

i think its OB. too many hyperlinks

Explanation:


1.can you identify the materials needed in making simple doorbell ???

2.what is the use of each material or tool needed in making simple doorbell?????

pakianswer po ng maayos​

Answers

Answer:

1. rotary tool, spray paint, light, drill,

Explanation:

What should Iris obtain from the client in order to display the work in her portfolio?

Answers

Answer:

depends on the laws of the country in which you are working

Explanation:

This is very vague and usually depends on the laws of the country in which you are working. In some cases, Iris would need permission from the client in order to display the work. In other cases, Iris would not need anything because she is the original creator of the content. This mostly depends on the laws of the country and whether or not a specific contract was created between Iris and the client, stating if the content rights where transferred or not.

Each time David saves a file, he saves it to the desktop of the computer. His desktop is very cluttered and he has trouble finding the files that he needs. Advise David on a more effective way to organize his files​

Answers

Answer:

well she should organise his desktop a-z so that way he can just look at the name of the file he needs or give the files easier names to remember that way whatever file he needs he can just click on it

Explanation:

David could organise them in alphabetical order or he could delete all the files he no longer needs. He could also sort them into different folders depending on the type of software he uses for each file.

what is the difference between coding with html and coding with python

Answers

Answer:

Python is an object-oriented programming language that is designed to be accessible and simple for all users, HTML is a web language and is used globally to define the structure of web pages by using various tags. HTML is not a programming language it's a markup language which is used to formatting web pages. Python is a general purpose scripting language which can be used to develop a wide range of programs.

Define the terms of data and information .​

Answers

data is a collection of facts such as numbers words measurements observation or just description of thing. information is facts provided or learned about something or someone.

Explain cell reference and its types with examples?​

Answers

Answer:

There are two types of cell references: relative and absolute. Relative and absolute references behave differently when copied and filled to other cells. Relative references change when a formula is copied to another cell. Absolute references, on the other hand, remain constant, no matter where they are copied.

i need a constant supply and i am not portable
A. desktop pc
B. smart phone
C. tablet pc
D. laptop​

Answers

the answers desktop pc
Other Questions
Fill in: already, since, for, just, yet, ever, never, 5 so far. 1 He has won ten competitions ..... 2 They haven't signed up for the games 3 He has played professional hockey......... ten years. 4 The team has ......... won two games and is hoping to win its third next week. 5 "Have you ........ tried skydiving?" "No, I'm really afraid of heights." 6 Tom is the captain of the football team. He has been captain ......... 2006. 7 The visiting team has........ arrived and the game will be starting in ten minutes. 8 Although he's a good swimmer, he has won a competition. According to the National Association of Colleges and Employers, the average starting salary for new college graduates in health sciences was . The average starting salary for new college graduates in business was (National Association of Colleges and Employers website). Assume that starting salaries are normally distributed and that the standard deviation for starting salaries for new college graduates in health sciences is . Assume that the standard deviation for starting salaries for new college graduates in business is . Can someone help please?Explain how the adaptive changes in coat-color genes allowed mice to travel under the radar of hungry predators. Hai xe chuyn ng trn cng mt on ng , khi xe (1) A th xe (2) B pha trc vi AB=5km . Xe (1) ui theo xe (2) . Ti C cch B mt on BC=10km th xe (1) ui kp xe (2) . Tm t s vn tc ca hai xe Find an antiderivative F(x) with F(x) = f(x) = 6 + 24x^3 + 18x^5 and F(1)=0. Evaluate 5|7 - 9| - 2.-12018 help ------------------------- This are diferente question help me please The negative sqaure root 75 fall between which consecutive integers. Which table represents a linear function which one does not belong? A. la guitarraB. el tamborC. el conductorD. el piano which religion expaneded or spread from its oringinal culture A cone has a diameter of 4 inches and a height of 9 inches. Find the volume of the cone. Use 3.14 for \large \pi. I dont get this at all In no less than seventy-five words, explain how both Ulysses and Telemachus meet their final challenges by means of the slaughter of the suitors. Read the excerpt from My Story.More of us rode the buses than Caucasians did, because more whites could afford cars. It was very humiliating having to suffer the indignity of riding segregated buses twice a day, five days a week, to go downtown and work for white people.How is this excerpt structured?cause and effectchronologyproblem and solutionanswer QuestionFind the volume of a rectangular solid with the given dimensions: length 25 feet, width 7 feet, height 10 feet. Give youranswer without units. The equation x ^ 2 - 2x + y ^ 2 - 4y = 20 defines a circle in the xy-coordinate plane What is the radius of the circle? Which of the following employs an ad hominem fallacy? Colin buys a tv for 530. It depreciates at a rate of 3% per year. How much will it be worth in 5 years? Give your answer to the nearest penny where appropriate.