Write a function that takes as input two parameters: The first parameter is a positive integer representing a base that is guaranteed to be greater than 1. The second parameter is an integer representing a limit. The function should return a list containing all of the non-negative powers of the base less than the limit (not including the limit). The powers should start at base^0=1 and increase from there until the limit. If the limit is less than 1 the functions should just return an empty list

Answers

Answer 1

Answer:

Written in Python:

def powerss(base, limit):

   outputlist = []

   i = 1

   output = base ** i

   while limit >= output:

       outputlist.append(output)

       i = i + 1

       output = base ** i

   return(outputlist)

Explanation:

This declares the function

def powerss(base, limit):

This creates an empty list for the output list

   outputlist = []

This initializes a counter variable i to 1

   i = 0

This calculates base^0

   output = base ** i

The following iteration checks if limit has not be reached

   while limit >= output:

This appends items to the list

       outputlist.append(output)

The counter i is increased here

       i = i + 1

This calculates elements of the list

       output = base ** i

This returns the output list

   return(outputlist)


Related Questions

Write a program that declares variables named init1, init2, and init3, to hold your three initials. Display the three initials with a period following each one, as in J.M.F.

Answers

Answer:

Written in Python

init1 = input("initials 1: ")

init2 = input("initials 2: ")

init3 = input("initials 3 ")

print(init1+"."+init2+"."+init3)

Explanation:

This line prompts user for init1 and gets the input

init1 = input("initials 1: ")

This line prompts user for init2 and gets the input

init2 = input("initials 2: ")

This line prompts user for init3 and gets the input

init3 = input("initials 3 ")

This line prints out the required output

print(init1+"."+init2+"."+init3)

which of the following uses technical and artistic skills to create visual products that communicate information to an audience? ○computer engineer ○typography ○computer animator ○graphic designer​

Answers

Answer:

grafic desiner

Explanation:

just a guess lol

Answer:

I don't know...

Explanation:

D

How could these same commands be used on a computer or network operating system?

Answers

Answer:

To manipulate data into information

After a chart has been inserted and formatted, is it possible to change the data range it refers to or to add new rows of data?

A:No, additional data cannot be included in a chart once it has been created; the user should delete the chart and create a new chart.
B:Yes, click the Select Data button in the Data group under the Design tab to extend or reduce the data range.
C:Yes, click the chart, select the additional rows or columns of data to add, and press Enter on the keyboard.
D:Yes, double-click the chart and select Properties from the list; in the Properties box, insert the new data range to include in the chart.

Answers

Answer:

b) Yes, click on the Select Data button in the Data group under the Design tab to extend or reduce the data range.

Explanation:

The correct answer is b. Data ranges included in a chart frequently need to change to include more rows or columns. Extend or reduce the range quickly by using the Select Data Source dialogue box to revise the data range. :)

Answer:

ITS B

Explanation:

edge2021

Which of the following practices is NOT recommended when designing with type?
A:Choose fonts that reflect the mood and style of your project. DO NOT- Use all caps or bold unless titles, headlines, logos. (graphics vs text) Type over high contrast BG... Is it readable?
B:Choose colors that have a clear contrast with the background.
C:Use all caps or bold text for paragraphs.
D:Make your headings and titles larger than the paragraph text.

Answers

Answer:

C

Explanation:

Typically speaking BOLD OR CAPS CAUSE THE PARAGRAPH TO BE HARD TO READ AND NOT CLEAN IN TERMS OF DESIGN.

But keeping general capitical rules and using italics to put emphasis in the paragraph is much easier to read, and much cleaner to the eye.

Plz help ASAP

Where are fiber optic cables often used?

A. To connect LANs inside your home

B. To support wireless access points (WAP)

C. To enable near field communications

D. To connect networks that are far apart of that have high data volumes.

Answers

Answer:

D

Explanation:

fiber optic cables are generally used by isps which is why they call their internet fiber optic

20 POINTS!!!!!!! Which is considered a collection of code that can be run?

Answers

a computer program is a collection of instructions that can be executed by a computer to perform a specific task. A computer program is usually written by a computer programmer in a programming language.

Answer:

PROGRAM

Explanation:

I went and looked it up in my lesson, and I got it correct!!

Hope This Helped! :)

Windows 1.0 was not considered to be a "true" operating system but rather an operating environment because _____.


it provided a shell for MS-DOS

it could only run one application at a time

it didn't use a pointing device

it crashed a lot

Answers

Why was Windows 1.0 considered an operating environment rather than an operating system. Because it was only a shell; MS-DOS was still the operating system. ... One difference between Windows 3.0 and Windows 2.0 was that users could no longer use MS-DOS commands to operate their computers.... the answer is “it provided a shell for MS-DOS

Answer:

Because it was only a shell; MS-DOS was still the operating system.

Explanation:

i took the quiz it ia accurate

Define a function createPhonebook that accepts three arguments: A list of first names A list of last names A list of phone numbers All three arguments will have the same number of items. createPhonebook should return a dictionary where the keys are full names (first name then last name) and the values are phone numbers. For example: firstNames

Answers

Answer:

def createPhonebook(firsts, lasts, numbers):

   d = {}

   for i in range(len(firsts)):

       k = firsts[i] + " " + lasts[i]

       d[k] = numbers[i]

   

   return d

Explanation:

Create a function named createPhonebook that takes three arguments, firsts, lasts, numbers

Initialize an empty dictionary, d

Create a for loop that iterates the length of the firsts times(Since all the arguments have same length, you may use any of them). Inside the loop, set the key as the item from firsts, a space, and item from lasts (If the name is "Ted" and last name is "Mosby", then the key will be "Ted Mosby"). Set the value of the key as the corresponding item in the numbers list.

When the loop is done, return the d

the company has finished designing a software program but users aren't sure how to use it​

Answers

Answer:

The company should go back into the company and make it a little more easier to use or the company should put out an announcement or something so the people trying to use it know how

Explanation:

Mark me the brainliest please and rate me

Answer:

Several people in the human resources department need new software installed. An employee has an idea for a software program that can save the company time, but doesn't know how to write it.

Explanation:

The collaborative team responsible for creating a film is in the process of creating advertisements for it and of figuring out how to generate excitement about the film. Which of the five phases of filmmaking are they most likely in?

Answers

Answer:

Distribution.

Explanation:

Filmmaking can be defined as the art or process of directing and producing a movie for viewing in cinemas or television. The process of making a movie comprises of five (5) distinct phases and these are;

1. Development.

2. Pre-production.

3. Production.

4. Post-production.

5. Distribution.

Distribution refers to the last phase of filmmaking and it is the stage where the collaborative team considers a return on investment by creating advertisements in order to have a wider outreach or audience.

In this scenario, the collaborative team responsible for creating a film is in the process of creating advertisements for it and of figuring out how to generate excitement about the film.

Hence, they are likely to be in the distribution phase in relation to the five phases of filmmaking.

Answer:

C: distribution

Explanation:

edg2021

1.00 Point: WD Skill 1.9 Create Document Footers
Add the Title field using the default format to the footer of the document.

Answers

Answer: 1.00 point

Explanation:

Is 583 a string or a number?

Answers

It is a number that is the answer

Answer:

a string

answer

Write a method called printRangeOfNumbers that accepts a minimum, maximum numbers as parameters and prints each number from minimum up to that maximum, inclusive, boxed by curly brackets. For example, consider the following method calls:

Answers

Answer:

The method in python is as follows:

class myClass:

    def printRange(min,max):

         for i in range(min, max+1):

              print("{"+str(i)+"} ", end = '')

           

Explanation:

This line declares the class

class myClass:

This line defines the method

    def printRange(min,max):

This line iterates from min to max

         for i in range(min, max+1):

This line prints the output in its required format

              print("{"+str(i)+"} ", end = '')

Choose the word to make the sentence true. The ____ function is used to display the program's output.

O input
O output
O display

Answers

The output function is used to display the program's output.

Explanation:

As far as I know this must be the answer. As tge output devices such as Monitor and Speaker displays the output processed.

The display function is used to display the program's output. The correct option is C.

What is display function?

Display Function Usage displays a list of function identifiers. It can also be used to display detailed usage information about a specific function, such as a list of user profiles with the function's specific usage information.

The displayed values include the prefix, measuring unit, and required decimal places.

Push buttons can be used to select functions such as summation, minimum and maximum value output, and tare. A variety of user inputs are available.

A display is a device that displays visual information. The primary goal of any display technology is to make information sharing easier. The display function is used to display the output of the program.

Thus, the correct option is C.

For more details regarding display function, visit:

https://brainly.com/question/29216888

#SPJ5

Write a program that computes and display the n! for any n in the range1...100​

Answers

Answer:

const BigNumber = require('bignumber.js');

var f = new BigNumber("1");

for (let i=1; i <= 100; i++) {

 f = f.times(i);

 console.log(`${i}! = ${f.toFixed()}`);

}

Explanation:

Above is a solution in javascript. You will need a bignumber library to display the numbers in full precision.

In this exercise you will debug the code which has been provided in the starter file. The code is intended to take two strings, s1 and s2 followed by a whole number, n, as inputs from the user, then print a string made up of the first n letters of s1 and the last n letters of s2. Your job is to fix the errors in the code so it performs as expected (see the sample run for an example).
Sample run
Enter first string
sausage
Enter second string
races
Enter number of letters from each word
3
sauces
Note: you are not expected to make your code work when n is bigger than the length of either string.
1 import java.util.Scanner;
2
3 public class 02_14_Activity_one {
4 public static void main(String[] args) {
5
6 Scanner scan = Scanner(System.in);
7
8 //Get first string
9 System.out.println("Enter first string");
10 String s1 = nextLine(); 1
11
12 //Get second string
13 System.out.println("Enter second string");
14 String s2 = Scanner.nextLine();
15
16 //Get number of letters to use from each string
17 System.out.println("Enter number of letters from each word");
18 String n = scan.nextLine();
19
20 //Print start of first string and end of second string
21 System.out.println(s1.substring(1,n-1) + s2.substring(s1.length()-n));
22
23
24 }

Answers

Answer:

Here is the corrected program:

import java.util.Scanner; //to accept input from user

public class 02_14_Activity_one { //class name

    public static void main(String[] args) { //start of main method

    Scanner scan = new Scanner(System.in); //creates Scanner class object

  System.out.println("Enter first string"); //prompts user to enter first string

          String s1 = scan.nextLine(); //reads input string from user

  System.out.println("Enter second string"); //prompts user to enter second string

          String s2 = scan.nextLine(); //reads second input string from user

    System.out.println("Enter number of letters from each word"); //enter n

          int n = scan.nextInt(); //reads value of integer n from user

          System.out.println(s1.substring(0,n) + s2.substring(s2.length() - n ));

         } } //uses substring method to print a string made up of the first n letters of s1 and the last n letters of s2.

Explanation:

The errors were:

1.

Scanner scan = Scanner(System.in);

Here new keyword is missing to create object scan of Scanner class.

Corrected statement:

 Scanner scan = new Scanner(System.in);

2.

String s1 = nextLine();  

Here object scan is missing to call nextLine() method of class Scanner

Corrected statement:

String s1 = scan.nextLine();

3.

String s2 = Scanner.nextLine();

Here class is used instead of its object scan to access the method nextLine

Corrected statement:

String s2 = scan.nextLine();

4.

String n = scan.nextLine();

Here n is of type String but n is a whole number so it should be of type int. Also the method nextInt will be used to scan and accept an integer value

Corrected statement:

int n = scan.nextInt();

5.

System.out.println(s1.substring(1,n-1) + s2.substring(s1.length()-n));

This statement is also not correct

Corrected statement:

System.out.println(s1.substring(0,n) + s2.substring(s2.length() - n ));

This works as follows:

s1.substring(0,n) uses substring method to return a new string that is a substring of this s1. The substring begins at the 0th index of s1 and extends to the character at index n.

s2.substring(s2.length() - n ) uses substring method to return a new string that is a substring of this s2. The substring then uses length() method to get the length of s2 and subtracts integer n from it and thus returns the last n characters of s2.

The screenshot of program along with its output is attached.

Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which principal of programing should Alice review?

Answers

Answer:

sequencing

Explanation:

from flvs

Answer:

Sequencing

Explanation:

Consider the two lists A and B. List A is an anagram of list B if the following two conditions are true: 1.list A and list B have the same number of elements 2.each element of list A occurs the same number of times in list A and list BFor example, [3, 2, 4, 1, 2] and [2, 2, 3, 1, 4] are anagram of each other, but [2, 3, 1, 2] and [1, 3, 1, 2] are not. Write a function named isAnagram that takes two lists of integers as parameters: lstA and lstB. The function isAnagram should return the bool value True if lstA is an anagram of lstB and False otherwise. The following is an example of correct output: >>> print(isAnagram([14, 10, 19], [10, 14, 19]))True

Answers

Answer:

cdacaddacdbbbbbacddebb

Explanation:

________________________ is an information system that stores user data in many different geographical locations and makes that data available on demand.

Answers

Answer:

CDN(content delivery network)

Explanation:

Content delivery network(CDN) which can as well be regarded as Content Distribution Network helps in acheiving high website performance, it essential in reduction of latency, through making the time a request is made using a website to when the website is fully loaded to be short and Minimal. It important in a situation whereby there is traffic loads from the users as well as server. It should be noted that CDN

is an information system that stores user data in many different geographical locations and makes that data available on demand. CDN's usefulness is also found in Cloud computing network such as Software as a service(SaaS). Google doc is an example.

The factor which most establishes an internet search as efficient and useful for a business is:
A.the number of people who use it.
B.the ancillary options it has (reverse image search, audio search, etc.).
C. a well-curated index.
D. how it monetizes searches.

Answers

Answer:

a well-curated index.

Explanation:

Got it right on a test

The factor which most establishes an internet search as efficient and useful for a business is the number of people who use it. The correct option is A.

What is internet?

The Internet, also known as "the Net," is a worldwide system of computer networks a network of networks in which users at any one computer can obtain information from any other computer if they have permission.

The Internet is referred to as a network of networks because it is a global network of computers that are linked together by cables and telephone lines, allowing them to communicate with one another.

A well-curated index is the factor that most establishes an internet search as efficient and useful for a business.

A Curator selects and manages the assets in a Curated Index vault. A curator selects the assets and determines their respective valuations before adding them to the vault and issuing vault shares.

Thus, the correct option is A.

For more details regarding internet, visit:

https://brainly.com/question/13308791

#SPJ5

To prevent any unnecessary injuries to small adults and the elderly from a deploying airbag, these


individuals should


as possible.


A. position their seats as far forward


B. position their seats as far back


c. recline their seats as far back


D. none of the above

Answers

Answer:

B. position their seats as far back

Explanation:

An airbag can be defined as a vehicle safety device (bag) that is designed to be inflated and eventually deflated in an extremely rapid or quick manner during an accident or collision.

Basically, an airbag refers to an occupant-restraint safety device installed on vehicles to protect both the driver and front-seat passenger in the event of an accident or collision. An airbag typically comprises of an impact sensor, flexible fabric bag, airbag cushion and an inflation module.

In order to prevent any unnecessary injuries to small adults and the elderly from a deploying airbag, these individuals should position their seats as far back as possible. This ultimately implies that, both the driver and the front-seat passenger are advised not to position too close to the dashboard; the seats should be as far back as possible.

Which transition level is designed to begin the process of public participation?
A. Level 1: Monitor
B. Level 2: Command
C. Level 3: Coordinate
D. Level 4: Cooperate
E. Level 5: Collaborate

Answers

D level 4:Cooperate hope this helps

Write two statements to read in values for my_city followed by my_state. Do not provide a prompt. Assign log_entry with current_time, my_city, and my_state. Values should be separated by a space. Sample output for given program if my_city is Houston and my_state is Texas: 2014-07-26 02:12:18: Houston Texas Note: Do not write a prompt for the input values. 1 current_time = '2014-07-26 02:12:18:' 2 my_city = "' 3 my_state = "" 4 log_entry - "' 1 test passed 6 print(log_entry) All tests passed Run Run

Answers

Answer:

Here is the program:

current_time = '2014-07-26 02:12:18:'  

my_city = ''

my_state = ''

log_entry = ''

 

my_city = input("")   #reads in value for my_city

my_state = input("")  #reads in value for my_state

log_entry = current_time + ' ' + my_city + ' ' + my_state   #concatenates current_time, my_city and my_state values with ' ' empty space between them

 

print(log_entry)

Explanation:

You can also replace

log_entry = current_time + ' ' + my_city + ' ' + my_state  

with

log_entry = f'{current_time} {my_city} {my_state}'

it uses f-strings to format the strings

If you want to hard code the values for my_city and my_state then you can replace the above

my_city = input("")

my_state = input("")

with

my_city = "Houston"

my_state = "Texas"

but if you want to read these values at the console from user then use the input() method.

The screenshot of the program along with the output is attached.

In this exercise we have to use the knowledge of the python language to write the code, so we have to:

The code is in the attached photo.

So to make it easier the code can be found at:

current_time = '2014-07-26 02:12:18:'

my_city = ''

my_state = ''

log_entry = ''

my_city = input("")   #reads in value for my_city

my_state = input("")  #reads in value for my_state

log_entry = current_time + ' ' + my_city + ' ' + my_state   #concatenates current_time, my_city and my_state values with ' ' empty space between themlog_entry = current_time + ' ' + my_city + ' ' + my_state

log_entry = f'{current_time} {my_city} {my_state}'

my_city = input("")

my_state = input("")

my_city = "Houston"

my_state = "Texas"

See more about python at brainly.com/question/26104476

what is the interpretation of this statement " Life is not a grand harmony, conflict exist. we much learn how to live it, use it constructively and minimize it's destructive aspect"

Answers

Answer:

Thats true but thats why we should never give up so we may strive to change the world even if it's a little bit.

Explanation:

Hope this helps! :)

Using the drop-down menus, correctly complete the sentences.
A(n)_____
is a set of step-by-step instructions that tell a computer exactly what to do.
The first step in creating a computer program is defining a(n)_____
the next step is creating a(n)______
problem that can be solved by a computer program.
A person writing a computer program is called a(n)
DONE

Answers

Wait I know u still need the answer or not anymore

Answer:

I'm pretty sure these are right:

1. algorithm

2. problem

3. math

4. computer programmer

What decides the amount of delay between shots on a digital camera?

Answers

Answer:

Some cameras have something called “shutter lag” which is the time it takes from the instant the shutter is pressed, until the instant the picture is taken. This can be very disruptive to the photographer, and although it is not possible to eliminate this delay, it is possible to minimize it a lot.

Explanation:

One of the main causes of shutter lag in dSLR cameras is the mirror that allows you to preview the image, since it needs to be raised in order for the light to reach the sensor. This time is minimal, however, and varies from camera to camera.

The focus delay exists in professional cameras as well and needs to be avoided in the same way, but the time it takes for the lens to clear the image, in these cases, is slightly less. Another factor that contributes to the photographer is the use of manual focus, completely eliminating this type of shutter lag.

Another type of delay that occurs is the image processing time by the sensor. This is not really a shutter lag, since it occurs after the photo was taken, but it can hinder the capture of sequential photos, as many cameras spend several seconds processing the same image.

Tasha works as an information technologist for a company that has offices in New York, London, and Paris. She is based out of the New York office and uses the web to contact the London and Paris office. Her boss typically wants her to interact with customers and to run training seminars to teach employees new software and processes. Which career pathway would have this type of employee?

Answers

Answer:

D. Interactive Media

Explanation:

i just took the test right now

The career pathway which would have this type of employee is an interactive media.

What is media?

Media is a terminology that is used to describe an institution that is established and saddled with the responsibility of serving as a source for credible, factual and reliable news information to its audience within a geographical location, either through an online or print medium.

In this context, an interactive media is a form of media that avail all media personnels an ability to easily and effectively interact with their customers or audience.

Read more on media here: https://brainly.com/question/16606168

Which situation best illustrates how traditional economies meet their citizens needs for employment and income

APEX!!

A. A parent teaches a child to farm using centuries old techniques.
B. A religious organization selects a young person to become a priest
C. A government agency assigns a laborer a job working in a factory
D. A corporation hires an engineer who has just graduated from college

Answers

The situation that best show how traditional economies meet their citizens needs for employment and income  is that a parent teaches a child to farm using centuries old techniques.

What is a traditional economy about?

A traditional economy is known to be a type of system that depends on customs, history, and time framed/honored beliefs.

Tradition is know to be the guide that help in economic decisions such as production and distribution. Regions with traditional economies are known to depend on agriculture, fishing, hunting, etc.

Learn more about  traditional economies from

https://brainly.com/question/620306

Question 8 (3 points) Which of the following is an external factor that affects the price of a product? Choose the answer.
sales salaries
marketing strategy
competition
production cost​

Answers

Answer: tax

Explanation: could effect the cost of items because the tax makes the price higher

oh sorry i did not see the whole question

this is the wrong awnser

Answer is competition
Other Questions
The population in a 50 square mile area is 200 people. What is the population density? what is the chance of me mashing ; ) What are the responsibilities of an individual in regard of social justice? Robert Hooke used a microscope to see that cork looked like it was made of little boxes. Anton van Leeuwenhoek saw tiny cells swimming in pond water. Which part of cell theory do these observations best support? A.Cells come from other cells.B.All organisms are unicellular.C.Cells are the basic unit of life.D.All organisms are multicellular.____ 23. Which of the following characteristics do all unicellular organisms share? A.All unicellular organisms reproduce.B.All unicellular organisms have a nucleusC.All unicellular organisms eukaryotes.D.All unicellular organisms prokaryotes.____ 24. Which term describes one or more cells that carry out all of the processes needed to sustain life? A.DNAB.organismC.organellesD.cytoplasm____ 25. DNA is genetic material that provides instructions for all cell processes. Where is the DNA located in prokaryotes? A.in the nucleusB.in the cytoplasmC.in the flagellaD.in membrane-bound organelles A ball is thrown horizontally from the top ofa building 51 m high. The ball strikes theground at a point 120 m from the base of thebuilding.The acceleration of gravity is 9.8 m/s2.Find the time the ball is in motion.Answer in units of s.If the time the ball is in motion is 3.22617 sFind the initial velocity of the ball.Answer in units of m/s. Question 3 (Multiple Choice Worth 5 points)After identifying a language technique an author has used, you should ask:O Did the author use this technique correctly?O How can I use this technique in my own writing?What is the meaning and effect of this technique?O When have I seen this technique used before?Question 4 (Essay Worth 10 points) Match the term to its use in creating perspective.1. placement2. size3. color4. converging linesA. Lines merging into a distance createan illusion of depth.B. The position of a shape relative to thehorizon affects your perception of depth.C. Adds spatial depth to a shape.D. A smaller shape, placed appropriately,appears more distant than a similarlarger shape. Can anyone help me with the ones you know please check both images Decreasing 3/4 times a number by 18 is equal to increasing 1/2 times the number by 5.I NEED ANSWERS!!! The average of the first 3 weights was 14 pounds. The average of the next 7 was 4 pounds. What was the overall average of the weights? Hyun is on a game show. Points are added for correct answers and subtracted for incorrect answers. At the end of the second round, he has 5 points. In the third round, he loses 5 points. How many points does Hyun have after the third round? please help i beg you Choose the best units (liters - l) or (milliliters - ml) to measure each of the following liquids.The amount of liquid that would fill a test tubeThe amount of mouthwash that would fill a travel-sized containerThe amount of coffee that would fill a thermos Select the correct answer.The foundation (or the base) of the Physical Fitness Pyramid is to:A. Lift weights.B. Go running.C. Create a lifestyle of physical fitness.D. Watch more TV. What was the major difference between the Sunni and Shia Muslims? A certain chemical reaction releases of heat for each gram of reactant consumed. How can you calculate the heat produced by the consumption of of reactant? Set the math up. But don't do any of it. Just leave your answer as a math expression. Also, be sure your answer includes all the correct unit symbols. Can someone please help me quick this is literally worth 50 points please help quick Im running out of timee BRAINLIEST ANSWER IF CORRECT!!!!!The function F has a removable discontinuity at? This graph represents- 2x + y = 4.Which ordered pair is in the solution set of -2x + y is greater than or equal to 4?A: (-2, - 1)B: (2, 1)C: (2, - 1)D: (-2, 1) Ms. Myers commented that _____ she slept in at the hotel was better than _____ she slept in at home.