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
lara [203]
2 years ago
9

Edhesive 3.5 code practice quetion one

Computers and Technology
1 answer:
sleet_krkn [62]2 years ago
6 0

Answer:

x = int(input("What grade are you in? "))

if (x == 9):

   print("Freshman")

elif (x == 10):

   print("Sophomore")

elif (x == 11):

   print("Junior")

elif (x == 12):

   print("Senior")

else:

   print("Not in High School")

Explanation:

Hope this helps lovely :)

You might be interested in
Number Array Class
UNO [17]

Answer:

Here is the Array class named Number:

#include <iostream>

#include <iomanip>

using namespace std;

class Number {

private:                            

   int size;                      

   float *ptr;                

   float num;                

   

public:                                          

   Number(){

       cout<<"Enter size of array: ";

        cin>>size;                            

   ptr = new float[size];  

   cout<<"Enter elements"<<endl;

   for(int i=0;i<size;i++)     {

       cin>>ptr[i];     }     }

   

   void getNumbers(){

        cout << "{ ";                    

   for (int i = 0; i < size; i++)           {

       cout <<ptr[i] <<setprecision(2)<< " ";             }

   cout << "}";            }

   

   Number(int s){

       ptr = new float[s];          

       size = s;      

   for (int i = 0; i < size; i++)     {

       cout << "Enter elements : ";    

       cin >> num;                          

       ptr[i] = num;         }  }

   

   ~Number(){

        delete [] ptr;    }

   void storeNumber(int input, float num){

        while (input < 0 || input > size-1)  {

       cout << "array size exceeded! Enter an element again " << endl;    

       cin >> input;    

       if (input >= 0 && input < size)  {

           ptr[input] = num;  

           break;       }   }

     if (input >= 0 && input < size)  {

       ptr[input] = num;   }  }

   

   void retrieveNumber(int position){

        while (position < 0 || position > size-1)  {

       cout << "array size exceeded! Enter an element again " << endl;    

       cin >> position;      

        if (position >= 0 && position < size)  {

           cout << "The number at "<<position<<"is: " << ptr[position];  

           break;           }     }      

   if (position >= 0 && position < size)     {

      cout << "The number at "<<position<<" is: " << ptr[position];     }   }    

 

   float HighestNumber(){

       float highest = ptr[0];      

   for (int i = 1; i < size; i++)     {

       if (ptr[i] > highest)         {

           highest = ptr[i];              }     }      

   return highest;      }

   

   float LowestNumber(){

       float lowest = ptr[0];      

   for (int i = 1; i < size; i++)     {

       if (ptr[i] < lowest)         {

           lowest = ptr[i];              }     }      

   return lowest;      }

   

   float AverageNumber(){

       float avg = 0.0;        

   for (int i = 0; i < size; i++)     {

       avg += ptr[i];         }      

   return avg/size;     }    

};

int main() {

   Number array;    

   array.getNumbers();    

   cout << endl;    

   int pos;        

   float no;    

   cout << "Choose an element to replace: ";  

   cin >> pos;    

   cout << "What number do you want to replace element with?" << endl;  

   cin >> no;    

   array.storeNumber(pos, no);

   array.getNumbers();  

   cout << endl;    

   int pos1;  

   cout << "Enter an element to retrieve the number: ";  

   cin >> pos1;    

   cout << endl;  

   array.retrieveNumber(pos1);  

   cout << endl;    

   cout << endl;    

   cout << "The highest number is: " << array.HighestNumber() << endl;    

   cout << "The lowest number is : " << array.LowestNumber() << endl;      

   cout << "Average of all numbers is : " << array.AverageNumber() << endl;    

    cout << endl;    

   return 0;        }

Explanation:

The program is well explained in the comments mentioned with each line of code in the attached document.

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

4 0
3 years ago
Question 1 (1 point)
Pachacha [2.7K]

Answer:

The answers are in the Explination :3

Explanation:

Question 1 - Portrait and Landscape.

Question 2 - Header and Footer

Question 3 - Formatting

Question 4 - Ctrl + Enter

Question 5 - Margins

7 0
2 years ago
When using the wait and signal operations, ____ sets the process's process control block to the blocked state and links it to th
lbvjy [14]
<span>When using the wait and signal operations, Wait sets the process's process control block to the blocked state and links it to the queue of processes waiting to enter this particular critical region.</span>
3 0
3 years ago
You can access various sites on the WWW by using hyperlinks or by______. A. entering a key word for your search B. following dir
saw5 [17]
The correct answer is C
8 0
2 years ago
Read 2 more answers
Complete the following:_____
alexira [117]

Answer:

The answer to the give question as follows:

1) \n

2) \t

3) \'

4) \"

5) \\

Explanation:

The description of the above symbols as follows:

  • The \n is used to provide the new line spacing.
  • The \t is used to provide a tab space.
  • To assign a single character value we use \' single.
  • The double \" quote is used to assign a string value.
  • The backslash is used to provide the character of the escape and it also used in a file path.
7 0
3 years ago
Other questions:
  • G=D+(A+C^2)*E/(D+B)^3 Rewrite the above formula in terms of doing concurrent processing using cobegin and coend to identify thos
    12·1 answer
  • ____ data exist in a format that does not lend itself to processing that yields information.
    8·1 answer
  • Which of the following identifies the patterns used for each data series in a chart?
    13·1 answer
  • What will the following program display?
    15·1 answer
  • Name the function in Python that prompts user to enter values as per the data type specified.
    5·1 answer
  • Write a program that will generate 100 integers between 0 and 1000. Store the even numbers in a sorted linked list called evens.
    12·1 answer
  • Name all mario kart games in order
    15·2 answers
  • Consider the following code segment
    15·1 answer
  • A. Suppose a CPU with a write-through, write-allocate cache achieves a CPI of 2. What are the read and write bandwidths (measure
    13·1 answer
  • What is computer assisted translation​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!