Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6187419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:03:18+00:00 2026-05-24T02:03:18+00:00

I wrote a simple python program that looks to me like it should be

  • 0

I wrote a simple python program that looks to me like it should be cpu intensive:

for a in range(0,1500):
      for b in range (0,a):
            for c in range(0,b):
                   x = a+b+c
                   print x

What happens is that it takes a really long time on solving it, but cpu consumption stays at around 25%. Why does this happens insead of using more cpu for a shorter time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:03:19+00:00Added an answer on May 24, 2026 at 2:03 am

    You’re probably running this on a quad-core CPU. Since this code will only run on one core, it will show as taking 25% of the total, when the single core is actually at 100%.

    On some operating systems, CPU usage will be shown as 100% per core (so that the total can go above 100%). On those operating systems your code should show 100% CPU usage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A while back I wrote a simple python program to brute-force the single solution
I wrote a very short program that parses a program using python and converts
I wrote this simple python program to help me with a bug in another
I wrote a simple tool to generate a DBUnit XML dataset using queries that
I wrote a simple Windows Forms program in C#. I want to be able
I have a simple Google App Engine app, that I wrote using ordinary strings.
I wrote a sample program at http://codepad.org/ko8vVCDF that uses a template function. How do
I'm trying to write a simple mail retrieval program in python. It seems the
Question: I've profiled my Python program to death, and there is one function that
I wrote a simple program(calculating the number of steps for the numbers 1-10^10 using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.