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 9120337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:36:18+00:00 2026-06-17T05:36:18+00:00

ho i making the random number be below the random number before. if Airplane==1:

  • 0

ho i making the random number be below the random number before.

 if Airplane==1:
 while icounter<4:
    ifuelliter=random.randrange(1,152621)
    #litter/kilometer
    LpK=152620/13500
    km=LpK*ifuelliter


    ipca=random.randrange(0,50)
    ipcb=random.randrange(0,50)
    ipcc=random.randrange(0,812)


    #3D space distance calculation
    idstance= math.sqrt((icba-ipca)**2 + (icbb-ipcb)**2 + (icbc-ipcc)**2)

    totaldist=km-idstance

    if totaldist>0:
          print "You have enoph fuel to get to New York AirPort"
          print ifuelliter,LpK,km,ipca,ipcb,ipcc,idstance
          icounter=3

    if totaldist<=0:

         print "You dont have enoph fuel to get to New York AirPort please go to the nearest one or you will die"
         print ifuelliter,LpK,km,ipca,ipcb,ipcc,idstance
         icounter=icounter+1

whati mean that the “ipca , ipcb , ipcc,” i need that they will grow down and not chust a other number.

  • 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-17T05:36:19+00:00Added an answer on June 17, 2026 at 5:36 am

    Just set the second parameter of randrange with the previous value:

    import random
    a = random.randrange(0,50)
    b = random.randrange(0,a)
    while b > a:
        b = random.randrange(0,a)
    

    By the way, be careful if your indenting style at the beginning of your code

    if Airplane == 1:
    while ....
    

    Should be

    if Airplane == 1:
        while ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know making a random number divisible by 10 means it isn't so random
Ok so I am making a roulette game. The random number that the spinner
I'm making a website and I need to store a random number of data
can anybody help me in making a method to generate random number without repetition
I am making a password generator that generates a random number, then I have
I am making a random number guessing game which the computer thinks of a
a)In this case does the random number generator uses the system's clock (making the
I am making a java program that uses the interpolation search below I have
So I am making this Guess the number game in c++ that looks like
does anyone know how to make a non-sequential random number generator in javascript? I

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.