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

  • SEARCH
  • Home
  • 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 7801165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:51:45+00:00 2026-06-02T00:51:45+00:00

I am building a python module which will take the two numbers.Then it will

  • 0

I am building a python module which will take the two numbers.Then it will find the random numbers between the two numbers for specific number of times and then add all of them a single variable. Then I will use the // operator to find the nearest and least whole number(integer in python). I have just made this much of code:

import random
def randint(minno, maxno, nooftime):

Here the minno is the least no and maxno is the maximum no and nooftime will be the no of times the random numbers will be generated and added to common variable(a , to be specific)
then i will divide a by the nooftime by using this equation (a//nooftime) and then I will print the base quotient
this module will be used for gaming purposes such as generating positions for an enemy to appear and for random map generaion

  • 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-06-02T00:51:47+00:00Added an answer on June 2, 2026 at 12:51 am

    This basically re-implements random.randint:

    from random import random
    
    def randint(minno, maxno, nooftime):
        a = sum([random() * (maxno-minno) + minno for _ in range(nooftime)])
        return a // nooftime
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building/using the python module for LAMMPS, which is the open source Molecular
I'm currently building a program in C# which will call functions in provided python
So, I'm building a GUI in Python using Tkinter which will be used to,
I'm building a Python extension module on Windows. The extension module is written in
I'm building a python app where a client side will request xml pages from
I'm building a Python module with about a hundred constants. I would like to
I'm building app with boost.python. I want to make each cpp-module as a single
I'm building a module where there are a whole lot of diverse objects which
I have a C/C++ application in which I define a Python module. I set
I'm building a Python application that utilizes a bunch of translated strings. The directory

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.