Assume there is a variable , h already associated with a positive integer value. Write the code necessary to count the number of perfect squares whose value is less than h, starting with 1. (A perfect square is an integer like 9, 16, 25, 36 that is equal to the square of another integer (in this case 33, 44, 55, 66 respectively).) Assign the sum you compute to a variable q For example, if h is 19, you would assign 4 to q because there are perfect squares (starting with 1) that are less than h are: 1, 4, 9, 16.

Answers

Answer 1

There are different approaches to this problem and they are listed below:

Approach 1

>>> highest = 19 # in your case this is h

lst = list (n**2 for n in range(1, highest + 1))

lst

[1, 4, 9, 16]

>>> print '\n'.join(str(p) for p in lst)

1

4

9

16

Approach 2

h = int(input('insert positive integer: '))

i = 1

total = 0

while total <= h:

   total += i ** 2

   i += 1

print(total)

Approach 3

h = int(input())

n = int((h - 1) ** 0.5)

q = n * (n + 1) * (2*n + 1) // 6

print(q)

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1


Related Questions

define spreadsheet in terms of its purpose ​

Answers

Answer:

A spreadsheet is a computer program that can capture, display and manipulate data arranged in rows and columns. Spreadsheets are one of the most popular tools available with personal computers. A spreadsheet is generally designed to hold numerical data and short text strings.

Answer:

A spreadsheet is a piece of software that can store, display, and edit data that has been organized into rows and columns.

Explanation:

What are five of the B2C Business models? Explain what each model is with a detailed example to back up your explanation.

Answers

The five of the B2C Business models are:

Direct sellersOnline intermediariesAdvertising-basedCommunity-basedFee-based.

What is B2C model?

Business-to-consumer (B2C) is known to be a type of business model that is one where   products or services are said to be sold straight to consumers.

Direct sellers - sold directly to consumers. Online intermediaries - online salesAdvertising-based - making of adsCommunity-based - Sales to a specific CommunityFee-based - sales based on subscription

Therefore, The five of the B2C Business models are:

Direct sellersOnline intermediariesAdvertising-basedCommunity-basedFee-based.

Learn more about B2C Business models  from

https://brainly.com/question/13621652
#SPJ1

While you can save files on OneDrive, you're unable to share them with
other people.
True
False

Answers

Answer:

I think it's false, hope this helps.

Fill in the blank: Problem statements are a succinct way to reference a user’s needs. They also help designers _____. (UX)

build wireframes and prototypes

establish the intent of a design

develop a design system

create a user group

Answers

Answer:

Problem statements are a succinct way to reference a user’s needs. They also help designers establish the intent of a design. (UX)

Can you solve this program?

Answers

The attributes of the InventoryTag object red_sweater with sample output for the given program with inputs: 314 500 ID: 314 Qty is given:

The Attributes

Sample output for the given program with inputs: 314 500

ID: 314

Qty: 500

1 class InventoryTag:

2 def __init__(self):

3 self. item_id

4 self. quantity remaining – olol

5

6 red_sweater – InventoryTag

7 red sweater. itemid input

8 red_sweater. quantity remaining – input

9 def split. check(check_amount, numdiners, tax rate 0.09, tip. rate 0.15):

10 return check mount (180 + tip. rate 100 tax rate 100)/(100 num diners)

Read more about computer programs here:

https://brainly.com/question/23275071
#SPJ1

What is the first step you must complete before modifying a form in Word?
O Ask for permission from the last person to modify it.
Remove any protections that restrict editing.
O Fill in the form so you know what it will look like.
O Share the form with anyone you want to complete the form.

Answers

The answer to the following question is A

Answer:

The correct answer is B, Remove any protections that restrict editing

Explanation:

You're welcome and have a nice day :)

regular alerts asking you if you want to quit? Humane Design or Addictive Design​

Answers

Explanation:

Its Addictive Design because :

In 1996, Dr Kimberly Young was one of the first scientists to warn against the addictiveness of computer use. That’s right, 25 years ago. Fast-forward to today, dark patterns are still rampant, and by forcing us to spend more time inside and online, the pandemic has accelerated the harmful effects of these mechanisms. Let’s take a look at Internet addiction, persuasive & addictive patterns.

Bartering involves exchanging goods and services. But today,
can be exchanged for goods and services.

Answers

Explanation:

Yes, but is an old method of trade. Nowadays people prefer money to buy things more than barter trade

Explain why there are more general-purpose registers than special purpose registers. ​

Answers

Answer:

Explanation:

General purpose registers are used by programmer to store data whereas the special purpose registers are used by CPU for temporary storage of the data for calculations and other purposes.

Sophia's plays her favorite game on her phone, where the game uses the phone's
camera to overlay images on real-world scenery. What type of game is Sophia
playing?
(1 point)
O virtual reality
O augmented reality
O multiplayer game
O virtual puzzle

Answers

Answer:

Augmented Reality

Explanation:

Augmented reality is a camera to overlay images on real-world scenery. Basically what the Pokemon GO app does.

Which of the problems McQuilkin and Copan mention in Chapter 11 are most important — that is which is the most compelling reason to reject Evolutionary Ethics and why.

Answers

A compelling reason that is valid enough to reject evolutionary ethics is that moral sense is not the only by-product of evolution.

This is because evolutionary ethics h1nges mostly on the interaction between philosophy and the natural sciences and the belief that natural selection had instilled morality in humans.

What is Evolutionary Ethics?

This refers to the study of the relationship between the theory of natural selection and ethical theory and practice.

Hence, we can see that A compelling reason that is valid enough to reject evolutionary ethics is that moral sense is not the only by-product of evolution.

This is because evolutionary ethics h1nges mostly on the interaction between philosophy and the natural sciences and the belief that natural selection had instilled morality in humans.

Read more about Evolutionary Ethics here:

https://brainly.com/question/14569807

#SPJ1

• List 2 examples of media balance:

Answers

Answer: balance with other life activities

spending time with family

studying / school work

Explanation:

HELP ME OUT PLEASE!!!!!!!!!

Question 3 (1 point)

Which is NOT a design principle?

O Contrast

O Alignment

O Balance

O Tint

----------------------------------------------------

Question 4 (1 point)

______ grants the creator of work exclusive rights for use and distribution.

O Intellectual Property

O Derivative Works

O Fair Use Doctrine

O Copyrighted

-------------------------------------------------------

Question 5 (1 point)

Intellectual Property is a work or invention that is a result of your intelligence or creativity and cannot be used without your permission.

O True

O False​

Answers

Answer:

Q3 = Contrast

Q4 = Copyright law

Q5 = True

I hope this helps!

Explain the function of the Page Map Table in all of the memory allocation schemes described in this chapter that make use of it. Explain your answer by describing how the PMT is referenced by other pertinent tables in each scheme.

Answers

In all memory storage allocation schemes, the Page Map Tables keep track of a page's assignment to a page frame. The Page Map Tables, on the other hand, are referenced directly from the Job Table in the Paged and Demand Paged schemes.

What is Page Map Table?

A page table is the file format used by a virtual memory foundation in a PC operating system to store the routing between physical and virtual regions.

A page table is a critical component of a virtual memory system that stores the mapping between virtual and physical addresses.

The Page Map Tables are used in all memory storage allocation schemes to keep track of a page's assignment to a page frame.

In the Paged and Demand Paged schemes, the Page Map Tables are mentioned straightforwardly from the Job Table.

Thus, this is the function of the Page Map Table in all of the memory allocation schemes.

For more details regarding page table, visit:

https://brainly.com/question/25757919

#SPJ1

Fill in the blank: When outlining your goals in a competitive audit, you should include your users, _____, and the product’s industry. (UX)

specific information about your product

the competition’s goals

how your product can beat the competition

a list of the competitors

Answers

Answer:

When outlining your goals in a competitive audit, you should include your users, how your product can beat the competition, and the product’s industry.

Explanation:

why photography came to be invented in the 1800s ?

Answers

Explanation:

Did you mean why it became invented well. Because photography allowed a glimpse of the past in new and utterly novel ways, it altered the perception of familiar places and things. Suddenly, one could move away from home but preserve a photograph of a birthplace, study the likeness of a dead relative, or see what a parent had looked like as a child.

f a student creates a five second animation with
two keyframes using 30 fps, how many tweens are used?

Answers

Answer:

Basing it on the information provided, a student that would want to make a short animation that is five seconds long, has two key frames and uses 30 frames per second (fps), he would be using 298 betweens. This is a key process in creating it.

Explanation:

Please help me with this Python coding assignment

Answers

The complete code to help you ask for numbers and then produce the square of the number as output is given below:

The Program

user_num = int(input('Enter integer:\n'))

   

print("You entered: ", user_num)

   

print(user_num, "squared is ", user_num*user_num)

   

print("And", user_num, "cubed is", user_num*user_num*user_num, "!!")

   

user_num2 = int(input("Enter another integer:\n"))

   

print(str(user_num) + str(user_num2), "is", user_num+user_num2)

   

print(str(user_num) * str(user_num2), "is", user_num*user_num2)

The Output

Enter integer:

4

You entered: 4

4 squared is 16

And 4 cubed is 64 !!

Enter another integer: 5

4 + 5 is 9

4 * 5 is 20

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

How does an IXP earn money?

Answers

Answer:

IXPs sell their services based on a port

Explanation:

Can you solve this question?

Answers

The answer to the given code question is:

class PatientData():    #declaration of PatientData class

  height_inches=0  #attribute of class is declared and initialized to 0

  weight_pounds=0 #attribute of class is declared and initialized to 0

The Program

#below is the class PatientData() that has two attributes height_inches and weight_pounds and both are initialized to 0

class PatientData():  

  height_inches=0

  weight_pounds=0  

patient = PatientData()  #patient object is created of class PatientData

#below are the print statements that will be displayed on output screen to show that patient data before

print('Patient data (before):', end=' ')

print(patient.height_inches, 'in,', end=' ')

print(patient.weight_pounds, 'lbs')

#below print  statement for taking the values height_inches and  weight_pounds as input from user

patient.height_inches = int(input())  

patient.weight_pounds = int(input())  

#below are the print statements that will be displayed on output screen to show that patient data after with the values of height_inches and weight_pounds input by the user

print('Patient data (after):', end=' ')

print(patient.height_inches, 'in,', end=' ')

print(patient.weight_pounds, 'lbs')      

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

Choose the word that matches each definition. A(n) is a statement that assigns a value to a variable.

Answers

An assignment statement is a statement that assigns a value to a variable.

What is a variable?

A variable can be defined as a specific name which refers to a location in computer memory and it is typically used for storing a value such as an integer.

This ultimately implies that, a variable refers to a named location that is used to store data in the memory of a computer. Also, it is helpful to think of variables as a storage container which holds data that can be changed in the future.

The methods for passing variables.

In Computer technology, there are two main methods for passing variables to functions and these include the following:

Pass-by-value.Pass-by-reference.

In conclusion, an assignment statement refers to a type of statement which s typically used by computer programmers and software developers to assign a value to a variable.

Read more on assignment statement here: https://brainly.com/question/25875756

#SPJ1

Why we need deterministic finite automata

Answers

It’s the simplest we can use.

There are five goals of a network security program. Describe each.

Answers

The five goals of a network security program are as follows:

Confidentiality.Integrity.Availability.Reliability.Optimization.

What is a Network security program?

A network security program may be defined as a type of program that significantly maintains and controls the durability, usability, reliability, integrity, safety, etc. of a network and its data appropriately.

Confidentiality determines the safety and security of personal data and information that can not be shared or divulged to third-party members. Integrity illustrates that the data and information in your computer system are generally maintained without the actual influence of unauthorized parties.

Availability means that personal data and information are accessed by the user whenever they need it. Reliability determines the capability of a system in order to operate under specific conditions for a particular period of time.

Optimization deals with the group of tools and strategies which are ideal for monitoring, controlling, and enhancing the overall performance of the program.

Therefore, the five goals of a network security program are well described above.

To learn more about Network security, refer to the link:

https://brainly.com/question/24122591

#SPJ1

Princeton 3 Company has the following information for May: Cost of direct materials used in production $17,300 Direct labor 44,700 Factory overhead 28,800 Work in process inventory , May 1 72,100 Work in process inventory , May 31 76,400 Finished goods inventory , May 1 30,300 Finished goods inventory , May 31 34,600

Answers

In order to get total cost of goods manufactured we have to add all the figures. After that total cost of good manufactured is $158,760.

What are goods?

Goods are the objects or articles that are manufactured and produced in the factories of daily household works and these are meant for the purpose of use and several goods are very important for the humans.

There is huge amount of goods produced yearly by factories and after selling these provide proper growth and profit to GDP of the country. GDP stands for gross domestic products and this is the total income of the country.

Therefore, In order to get total cost of goods manufactured we have to add all the figures. After that total cost of good manufactured is $158,760.

Learn more about goods here:

https://brainly.com/question/15727371

#SPJ1

Homework:
Think of/ Research a developing technology, how do you think it will impact an organisation? Write no less or more than 200 words.

Level 2 BTEC First Certificate in Information and Creative Technology

Answers

Answer:

I think we can use that: How do you think the Lumiere brothers would react to today's cinema world? Do you think filmmakers have gotten more creative, or do they just have more technology to create with? What do you think the Lumiere brothers would be able to do with today's cinema technology?

And then...

Considering that they created "Arrival of a Train" in 1896, we can understand that the industry and the movie making process has changed a lot in 124 years. I think that if you bring them out of 1896, they will be shocked to see how people make movies these days.

I think that they would be shocked because:

a) the movies usually have a meaning and stand as some sort of political or emotional message. b) there is a lot of CGI that is used to make imaginary or non existent characters exist in a realistic way such as "groot" from the GOTG movies. c) people today use movies to get their own imaginations out in the world and it isn't just for the entertainment of the audience anymore. As sad as that may be, it's true that movies today are always made to prove something or bring up an issue by the people involved so it can be argued by everyone (basically some people make controversial movies just for clout and not 'cause they actually care about that particular issue" so this may not be digestible to the Lumiere Brothers since they actually loved doing what they did for personal reasons, if that makes sense.

I think that if the Lumiere brothers were still here then they would make movies to connect with the audience. More emotional than political. Something that amazes people who are foreign maybe or poor or rich or anything else.

Explanation: Not my answer (btw) I'm not taking credit just trying to help other people>3

What's one way to help close the digital divide?

Answers

Answer:Answer:1. Literacy Answer:1. Literacy 2. High income levelsAnswer:1. Literacy 2. High income levels3. No geographical restrictionsAnswer:1. Literacy 2. High income levels3. No geographical restrictions4. Motivation to use technologyAnswer:1. Literacy 2. High income levels3. No geographical restrictions4. Motivation to use technology5. Physical access to technologyAnswer:1. Literacy 2. High income levels3. No geographical restrictions4. Motivation to use technology5. Physical access to technology6. Digital literacy

I NEED ASAP

Write a technical document (at least 500 words in length).

Identify the step-by-step instructions needed to operate a tool, design a system, or explain the bylaws of an organization.
Include all factors and variables that need to be considered.
Use headings, different fonts and other formatting techniques to aid in organization and comprehension.

PLEASE I CAN'T FIND SOMETHING THAT WILL MAKE 500 WORDS

Answers

Answer: The above question wants to analyze your writing skill, for that reason I can't write the document for you, but I will show you how to do it.

First, you will have to search for a tool that you want to present in your document. Also, you should research how this tool works.

A technical document needs to present a technical language, that is, you need to use professional words, in addition to maintaining a standard and formal language.

Steps to write the document:

Introduce the tool.

Show situations where it should be used.

Present a tutorial for the efficient use of the tool.

Be clear and objective, presenting direct information.

Explanation:

What does 'volatile' mean for a computer's memory?

Answers

Answer:

Explanation:

Volatile memory is a type of memory that maintains its data only while the device is powered. If the power is interrupted for any reason, the data is lost.

Hope this helped and have a good day

Using the encoding process as a model, create a function that will decipher an encrypted into a plaintext message or encrypt a plaintext message into cipher text string

Answers

The encoding process that creates a function that will decipher an encrypted into a plaintext message or encrypt a plaintext message into cipher text string is given below:

The Code

using System;

namespace EncryptStringSample

{

   class Program

   {

      static void Main(string[] args)

       {

           Console.WriteLine("Please enter a password to use:");

           string password = Console.ReadLine();

          Console.WriteLine("Please enter a string to encrypt:");

           string plaintext = Console.ReadLine();

           Console.WriteLine("");

           Console.WriteLine("Your encrypted string is:");

           string encryptedstring = StringCipher.Encrypt(plaintext, password);

           Console.WriteLine(encryptedstring);

           Console.WriteLine("");

          Console.WriteLine("Your decrypted string is:");

 string decryptedstring = StringCipher. Decrypt (encryptedstring, password);

           Console.WriteLine(decryptedstring);

           Console.WriteLine("");

           Console.WriteLine("Press any key to exit...");

           Console.ReadLine();

       } 

   }

}

Read more about encoding here:

https://brainly.com/question/19746078

#SPJ1

I'm stuck in this question please help

Q) Will robots replace humans one day?

Answers

Answer:

Robots will not replace humans

Explanation:

Robots will not replace humans – But they will make us smarter and more efficient. More than three-quarters of those polled (77%) believe that in fifteen years, artificial intelligence (AI) will significantly speed up the decision-making process and make workers more productive.

please make my answer as brainelist

Other Questions
>=smentLESSON 121. "I am a citizen of the world" is a key line in the story "When Greek Meets Greek." Whatdoes this line mean to you? Explain how this line fits the events of this story or anotherselection in this unit. Include details to support 1. What figurative language does the author use to describe the size of the cub? Explain how this comparison might create an image in the reader's mind. Question 1: (answer in place of item 16)Apple juice has a pH of around 3 and lemon juice has a pH near 2. If you were trying to neutralize the acid of these fruit juices for baking, which juice would need more baking soda? Why?(Extra Credit: if the apple juice needed .21 g of soda to neutralize it, how much soda would an equal quantity of lemon require?)Question 2:(answer in place of item 17)What is a mole and what is molarity? How are these ideas similar and how are they different?Question 3:(answer in place of item 18)Hexane is a non-polar solvent and ethanol is a polar solvent. Which of these would you choose to dissolve an ionic salt like LiCl? Why?Question 4:(answer in place of item 19)The pH of a solution has a big effect on the speed of some reactions and some reactions only happen in a certain pH range. Why is acid base chemistry important for medicine? 1. Find an equivalent ratio to 12:9 such that the second number is 3.O a. 6:3O b. 4:3O c. 9:3 Polygon Q is a scaled copy of Polygon P using a scale factor of1/2 Polygon Q's area is what fraction of Polygon P's area? When there is more rain the grass looks greener Hypothesis;Independent variable :Dependent variable: write the principal of the conservative of energy What motivated bryans rural followers to support bimetallism While David was riding his bike around the circular cul-de-sac by his house, he wondered if the constant circular motion was having any effect on his tires. What would be the best way for David to investigate this? A. Have someone videotape him riding and look for changes in the tires' performance. B. Time how long it takes him to ride 5 laps around his cul-de-sac. C. Measure the total distance traveled on his bike and divide this by how long it took him. D. Measure the wear on his treads before and after riding a certain numbe Question # 2Long Text (essay)List three things your nervous system does. The __________ is a thin fiber that carries signals away from the cell body. a. axon b. dendrite c. neuron d. glial cell please select the best answer from the choices provided a b c d a. 0.7 2 = whattttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt Layla has $680 to spend at a bicycle store for some new gear and biking outfits. Assume all prices listed include tax. She buys a new bicycle for $319.28. She buys 3 bicycle reflectors for $4.90 each and a pair of bike gloves for $37.94. She plans to spend some or all of the money she has left to buy new biking outfits for $77.02 each. What is a document called that is filed with the court to state the position of the plaintiff or the defendant in a lawsuit and ask for relief from the court?. Which step is included in the graph of the function f(x)=[x-17?O y=-5 for-4x Can someone please help me with this? In the strategy process, questions concerning where to compete, such as the industry or market, is referred to as ______ strategy. The city of San Diego has an average monthly rainfall of 0.87 inches per month. Brick reports that the average rainfall for the first threemonths was 2.02 inches per month and that the average rainfall for the next 7 months was 0.25 inches.What does the average rainfall for the rest of the year need to be per month so that San Diego meets its average monthly rainfallmarks for the year? Round your answer to the nearest hundredth The formula for converting degrees Celsius to degrees Fahrenheit is F=-C+32. Solve this formula for C. Which of the following taxpayers is allowed to fully deduct private mortgage insurance (PMI) on their Schedule A, Form 1040? Sam is single, his AGI is $106,000. He paid $600 in PMI. Abe and Sue are married and will file married filing jointly. Their AGI is $120,000 and they paid $1,200 in PMI. Gia is married but she will file using the married filing separately status. Her AGI is $55,000 and she paid $900 in PMI. Joe is single, his AGI is $99,000. He paid $800 in PMI. Mark for follow up