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
pogonyaev
3 years ago
8

Python - Please help!

Computers and Technology
1 answer:
Margaret [11]3 years ago
6 0

Answer:

i= 1

for i in range(1,n):

     if i * i < n:

           print(2* i + 1)

     i += 1

else:

     print('Hakuna Matata')

Explanation:

First, there's a need to rewrite the code segment in your question (because of indentation)

<em>i= 1</em>

<em>while i*i < n:</em>

<em>      print(2* i + 1)</em>

<em>      i += 1</em>

<em>else:</em>

<em>      print('Hakuna Matata')</em>

<em />

The explanation of the equivalent of the above while loop is as follows

This line initializes i to 1

i= 1

This line iterates from 1 to n-1

for i in range(1,n):

This line checks if i * i is less than n

     if i * i < n:

The following line is executed if the above condition is satisfied; otherwise, nothing is done

           print(2* i + 1)

The value of i is incremented by 1 using this line

     i += 1

The following is executed at the end of the iteration

else:

     print('Hakuna Matata')

<em>Note: Assume any value of n, both programs display the same output</em>

You might be interested in
PLEASE HELP I FAILED TWICE AND HAVE ONLY ONE MORE TRY BEFORE MY GRADE ARE SET I AM CRYINGGGGG PLEASEEE IM BEGGINGGGGG
anyanavicka [17]

1. C

2. B

3. C

4. A

5. A

6. B

7. C

8. D

9. C

10. B

11. D

12. D

13. D

14. A

15. A

16. B

17. A

18. B

19. D

20. B


Some of the ones towards the start may not be right but I gave it a go :)





8 0
3 years ago
50 points please!!
MA_775_DIABLO [31]

Answer:

poopypoopypoopypoopy

6 0
3 years ago
The Joint Photographic Experts Group developed the ___________ graphic format.
jolli1 [7]
1. <span>The Joint Photographic Experts Group developed the jpeg graphic format. 
2. </span><span>It is important to include the alt attribute of the tag because some people use text-only Web browsers. </span>
4 0
3 years ago
Read 2 more answers
From an SEO perspective, why is it important to have text alternatives to media items like images, audio, and video?
Ann [662]

Explanation:

This is because the SEO might not be able to access the media items wherever they are, or they could be deleted, or the media items may not be compatible with the SEO. It could also help to have alternatives for accessibility purposes. Therefore, it is important for the SEO to have alternatives to display incase a media item is unable to display for whatever reason.

8 0
2 years ago
Read 2 more answers
6
Allisa [31]

Answer:

objective of sustainable development are:

Explanation:

1.to help in poverty alleviation

2.to conserve the environment effectively

3.to gain human development and progress

4.to use resources and means carefully

6 0
3 years ago
Other questions:
  • A private local network, accessible only to an organization's staff, is known as an:
    12·2 answers
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • Yellow and blue light are projected on a white screen. what color will the screen appear to be?
    6·2 answers
  • Think back over the information presented in the lesson about how you can skillfully use the Internet when doing research. Selec
    14·1 answer
  • Patricia is leading an online group of students from many
    8·2 answers
  • A photographer uses which of these tools to form an argument?
    14·2 answers
  • the computer that communicate with each other are called ______please ask the answer in 15 minutes after 1 p.m. ​
    9·1 answer
  • Why would an end-user not generally buy a server? Explain your answer by referring to the typical role that servers perform. ​
    12·1 answer
  • Electronic evidence on computer storage media that is not visible to the average user is called​ ________.
    14·1 answer
  • Calculate the time complexity for the following function in terms of Big O notation. Explain your answer.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!