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
Furkat [3]
3 years ago
6

Codehs python 4.7.6 Powers of Two it says I'm wrong because I need

Computers and Technology
2 answers:
Finger [1]3 years ago
8 0

Following are the program to calculate the power of two:

Program Explanation:

  • Defining an integer variable "i" that hold an integer value.
  • Defining a for loop that checks "i" value in between 20, inside this it calculates power of two.
  • At the last use print method to print its value.

Program:

i=1#holding integer value in i

for i in range(20):#defining a for that starts 1 to 20    

   i = 2 ** i#calculate power of 2 in i variable

   print(i)#print value

Output:

Please find the attached file.  

Learn more:

brainly.com/question/23170807

Marrrta [24]3 years ago
8 0

\huge\fbox\orange{A} \huge\fbox\red{N}\huge\fbox\blue{S}\huge\fbox\green{W}\huge\fbox\gray{E}\huge\fbox\purple{R}

\huge\underline\mathtt\colorbox{cyan}{in attachment}

You might be interested in
Write a program that lets the Michigan Popcorn Company keep track of their sales for seven different types of popcorn they produ
valentina_108 [34]

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    // declare and initialize popcorn name array
  6.    string popcorn_name[7] = {"plain", "butter", "caramel", "cheese", "chocolate", "turtle", "zebra"};
  7.    // declare and initialize sales array with 7 elements
  8.    int sales[7];
  9.    
  10.    // A loop to prompt user to enter sales for each popcorn
  11.    for(int i=0; i < 7; i++){
  12.        cout<<"Enter number of sales for " + popcorn_name[i] + " :";
  13.        cin>>sales[i];
  14.    }
  15.    
  16.    // Find maximum sales
  17.    int max = sales[0];
  18.    int maxIndex = 0;
  19.    for(int j=1; j < 7; j++){
  20.        if(max < sales[j]){
  21.            max = sales[j];
  22.            maxIndex = j;
  23.        }
  24.    }
  25.    
  26.    // Find minimum sales
  27.    int min = sales[0];
  28.    int minIndex = 0;
  29.    for(int k=1; k < 7; k++){
  30.        if(min > sales[k]){
  31.            min = sales[k];
  32.            minIndex = k;
  33.        }
  34.    }
  35.    
  36.    // Print popcorn name and sales
  37.    for(int l=0; l < 7 ; l++){
  38.        cout<<popcorn_name[l]<<"\n";
  39.        cout<<"Sales: "<< sales[l]<<"\n\n";
  40.    }
  41.    
  42.    // Print popcorn name with maximum and minimum sales
  43.    cout<<"Highest selling: "<< popcorn_name[maxIndex]<<"\n";
  44.    cout<<"Lowest selling: "<<popcorn_name[minIndex]<<"\n";
  45.    return 0;
  46. }

Explanation:

Create two arrays to hold the list of popcorn name and their sales (Line 5-8). Next prompt user to input the sales for each popcorn (Line 10-14). Get the maximum sales of the popcorn (Line 17-24) and minimum sales (Line 27-34). Print the popcorn name and sales (Line 37-40) and the popcorn name with highest and lowest selling (Line 43-44).

5 0
3 years ago
The _______ move the fabric forward in the machine. A. pressure plates B. zipper feet C. hem guides D. feed dogs
Lyrx [107]
The equipment that move the fabric forward are called "Hem guides"
8 0
4 years ago
Talia was a scientist whose research compared the birth rates of young women of a New England community over the course of five
podryga [215]

Answer: b

Explanation: for me personally i will populate an infographic(chart)rather than essay form i prefer to use an infographic to show my anaylis how it went high or low or when.

8 0
3 years ago
Read 2 more answers
Write a public static method diagSum, which takes a 2d array of int values as a parameter, and returns the sum of the elements i
saveliy_v [14]

A 2d array (i.e. 2 dimensional array) represents its elements in rows and columns

<h3>The program in Java</h3>

The method in Java, where comments are used to explain each line is as follows

//This defines the method

public static int diagSum(int[][] myArray) {

    //This initializes sum to 0

    int sum = 0;

    //This iterates through each row of the array

               for (int i = 0; i < myArray.length; i++) {

                   //This calculates the sum of the diagonals

                       sum+=myArray[i][i];

               }

               //This returns the sum

               return sum;

       }

Read more about methods at:

brainly.com/question/15969952

6 0
2 years ago
A technician is tasked to implement a wireless router that will have the fastest data transfer speed at 5 GHz frequency. Which o
Basile [38]

Answer:

Option B i.e.,802.11ac is the correct option.

Explanation:

Because 802.11ac is that standard that is selected by the technician to install that router which is wireless and that router has the fastest speed of the data transfering that is 5GHz frequency. Mostly, the following standard is used in the large organizations by which the work done on time without any restriction to access the internet. So, that's why the following option is correct.

7 0
3 years ago
Other questions:
  • Very often in data science, we are interested in understanding how values change with time. Use np.diff and np.max (or just max)
    13·1 answer
  • When you ____ software, you are adapting it from one type of computer or operating system to run on a different computer or oper
    13·1 answer
  • What happens to weather patterns when a cold front approaches? What happens to
    14·1 answer
  • ____ is an act, directed at Web sites catering to children, that requires site owners to post comprehensive privacy policies and
    5·1 answer
  • How is the EF​ computed? A. ES​ + Activity time B. LF minusActivity time C. ​Min{LS of all immediate following​ activities} D. ​
    11·1 answer
  • If an individual receives 1.8 mGy while standing 4 ft from a source of radiation for 2 minutes, which of the following option(s)
    9·1 answer
  • 3 Points
    15·2 answers
  • In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in
    9·1 answer
  • Which of the following best describes the existence of undecidable problems? *
    6·1 answer
  • Who invented pascaline and when?​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!