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
bogdanovich [222]
3 years ago
12

2.5 code practice

Computers and Technology
1 answer:
Mamont248 [21]3 years ago
7 0

Answer:

try declarimg smt before the int eg answer=int(input("your answer"))

You might be interested in
How can the New command be added to the Quick Access Toolbar? Check all that apply.
VMariaS [17]

Answer:

B,D,E

Explanation:

i just answered this on edge and got it right.

7 0
3 years ago
Karen is designing a website for her uncle's landscaping business. She wants to ensure that it's engaging and provides a lot of
Rashid [163]

Explanation:

Talk About The Benefits. of your  service over other compines

4 0
3 years ago
Which feature is an interface between the user and the file system of a computer?
denis23 [38]
That would be the GUI or <span>graphical user interface. Hope this helps and have a nice day!

</span>
8 0
3 years ago
Read 2 more answers
Given an array of values which initially contains 9 8 7 6 5 4 3 2 1, what does the array look like after bubble sort has execute
Phantasy [73]

Answer:

//Here is code in C++.

//include header

#include <bits/stdc++.h>

using namespace std;

// function to print the array

void out_arr(int inp[], int len)

{

for (int i = 0; i < len; i++)

 cout << inp[i] << " ";

cout << endl;

}

// main function

int main()

{

   // decalare and initialize the array

int inp[] = {9,8,7,6,5,4,3,2,1};

//find the length of array

int len = sizeof(inp)/sizeof(inp[0]);

int x, y;

// perform bubble sort, only 3 pass

for (x = 0; x < 3; x++)  

{

for (y= 0; y< len-x-1; y++)

 if (inp[y] > inp[y+1])

 {

  int t=inp[y];

  inp[y]=inp[y+1];

  inp[y+1]=t;

 }

 

 cout<<"array after "<<x+1<<" pass"<<endl;

 // print the array after every pass

     out_arr(inp, len);

}

return 0;

}

Explanation:

Declare an integer array "inp" and initialize with {9,8,7,6,5,4,3,2,1}. Find the length of the array.In first pass of bubble sort, largest value is placed at the correct position in the array. And in the second, second largest value is placed at its correct position. After the n pass, array will be sorted. In each pass, each element is compared with the next element. if the value is greater than swap them. This continues for all elements in each pass. In the end of a pass a value is placed correctly. So if there is only 3 pass then 3 largest values will be placed at their right place.

Output:

8 7 6 5 4 3 2 1 9                                                                                                              

array after 2 pass                                                                                                            

7 6 5 4 3 2 1 8 9                                                                                                              

array after 3 pass                                                                                                            

6 5 4 3 2 1 7 8 9

7 0
3 years ago
Both versions of the LRAS Curve shift the same way. Which of the following will shift the LRAS Curve to the Right?
Talja [164]
The answer to this is C. decrease in quantity of capital
8 0
3 years ago
Other questions:
  • type the correct answer in the Box spell the words correctly Caleb is working on a simple logic base program to stimulate the ga
    5·2 answers
  • one business rule is that each project has one manager. Identify two (and no more than two) problems with the data structure or
    9·1 answer
  • Society that lives a nomadic life and relies on domesticated animals.
    6·1 answer
  • To use an ArrayList in your program, you must import:1. the java.collections package2. the java.awt package3. Nothing; the class
    6·1 answer
  • In which part is data processing done?
    12·1 answer
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • Which sort algorithm does the following outline define? for i between 0 and number_used-1 inclusivea. sequential b. non-sequenti
    13·1 answer
  • What does a spam e-mail normally promise you?
    9·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    5·2 answers
  • Language is PYTHON
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!