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
WILL GIVE BRAINLIEST AND 30 POINTS!! NEED ASAP!!!!
kotykmax [81]

Answer:

Explanation:

1. In tabletop games and video games, game mechanics are the rules that guide the player's moves or actions, as well as the game's response to them.

5.User interface is about the visual design and the information designs around the screens while the User Experience is about the whole experience and not only about the screen. User interface is mainly focused on the product while User experience on the other hand mostly focuses on the user and their journey through the product.

5 0
3 years ago
Reply emailing a student who is asking about audio materials​
Sergeeva-Olga [200]

Answer:

The student because you are replying to the student.

Explanation:

4 0
3 years ago
Read 2 more answers
In one paragraph summarize the history of the internet
ozzi

From 1982 to 1987 Bob Kahn and Vint Cerf are key members of a team which creates TCP/IP, the common language of all Internet computers. For the first time the it seemed as though the loose collection of networks which made up the ARPANET is seen as an “internet”, and the Internet as we know it today is born.

Explanation:

5 0
4 years ago
What is the standard internet protocol, which provides the technical foundation for the public internet?
luda_lava [24]
You have to be carefull no bulling cuiberbulling people hurt there self for stuff like that
3 0
3 years ago
1-Which organization produces<br> the NEC?
hammer [34]

Answer.

The National Electrical Code (NEC), or NFPA 70, is a regionally adoptable standard for the safe installation of electrical wiring and equipment in the United States. It is part of the National Fire Code series published by the National Fire Protection Association (NFPA), a private trade association.

Explanation:

4 0
3 years ago
Other questions:
  • You are the system administrator for a medium-sized Active Directory domain. Currently, the environment supports many different
    7·1 answer
  • 7. Glaciers have two types of deposition. Define them below:
    6·1 answer
  • Employees at a store are paid daily wages according to the following rules.
    6·1 answer
  • What is the name of the option in most presentation applications with which you can modify slide elements?
    9·2 answers
  • What computer worm was used to sabatoge iran's nuclear program?
    11·1 answer
  • Practice with CSS. a. Write the CSS for an HTML selector footer with the following characteristics: a light-blue background colo
    11·1 answer
  • What is the term for a combination of user name and domain name that identifies a user so he or she can receive Internet email?
    6·1 answer
  • Need answer ASAP. I’ll mark brainliest if correct
    7·1 answer
  • Can you plz type down a word.
    11·2 answers
  • The range of Cell that go across the spread sheet and are identified by numbers is called​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!