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
oksano4ka [1.4K]
3 years ago
7

Problem 1: Create a list that contains the months of the year. Problem 2: Create a loop to print the month number and name (do n

ot hard code the month number)
Computers and Technology
1 answer:
mart [117]3 years ago
8 0

Answer:

Program for problem 1:

Month_name=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] # List which holds the month name.

Program for problem 2 :

Month_name=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] # List which holds the month name.

for x in range (0,12): # loop which is used to print the name and number of the month.

  print(str(x+1)+" "+Month_name[x]) # It will print the number and month name.

Output of problem 1:

The program for problem 1 has no output because it has no print statement.

Output of problem 2:

The above program will print all the months with their number in which the first text will print the number of the month and the second text will print the name of the month.

Explanation:

Missing information:

"Design the program for problem 1 and problem 2" is missing on the above question.

Detailed Explanation:

  • The above program is in python language in which the first line creates a list of the names of the months.
  • Then the "for loop" is used to print the number and name of the program.
  • In this "for loop", the list index is printed by adding 1 on it with the value which is the name of the month.
  • It is because the list starting index value is 0 and the ending index value is size-1.

You might be interested in
Patricia's partner Alex has shared a spreadsheet he created. On the first row he has given the spreadsheet a title. The title ap
Alexxandr [17]

Answer:

Merge cells A1:E1 and centre the title text in the merged cell.

Explanation:

In order for the title of the shared spreadsheet document to appear centred in the first row above the other five columns, Patricia will be required to merge the first row A1 with the fifth row E1 and centre the title text in the merged cells. This increases the number of rows  and columns of the spreadsheet as the information in the other cells will be shifted down.

3 0
3 years ago
Create a structure representing a student. The member variables should include student name, student ID, and four test grades fo
Neporo4naja [7]

Answer:

Output:

Name: Brainly

ID:0001

Write the 4 tests grades of the student separated by space :10 9 8 10

Brainly

0001

10 9 8 10

Average :9.66667

'1' to continue '0' to exit :

Explanation:

#include<iostream>

#include<string>

using namespace std;

//variables declaration

struct Student {

  string id; //string declaration ID

  string name; // string declaration name

  int grades[4]; //array of 4 because it is 4 grades

};

//definition of the function get information

void inputData(Student &s){

 

   

   cout << "Name:" ;

   getline(cin,s.name);

   cout << "ID:";

   cin >> s.id;

   cout << "Write the 4 tests grades of the student separated by space :";

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

       cin >> s.grades[i];

}

//definition of the function of average

double inputAvg(Student s){

   double summation;

   int temporary;

   double average;

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

      for (int j = i; j<4; j++){

         if (s.grades[j] > s.grades[i]){

             temporary = s.grades[i];

             s.grades[i] = s.grades[j];

             s.grades[j] = temporary;

         }

      }

    }

    summation = 0;

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

        summation = summation + s.grades[i];  

    }

    average = summation/3;

    return average;

}

void disp(Student *s){

   cout << s->name << endl;

   cout << s->id << endl;

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

       cout << s->grades[i] << " ";

   cout << endl;

   cout << "Average :" << inputAvg(*s) << endl;

   

}

int main(){

  Student st;

  int ch;

  while(true){

      inputData(st);

      disp(&st);

      cout << " '1' to continue '0' to exit :";

      cin >> ch;

      if (ch == 0)

         break;      

  }

  return 0;

}

6 0
3 years ago
Which of the following described a global network connecting billions of computers and other
zloy xaker [14]
Pretty sure its wifi
5 0
3 years ago
Read 2 more answers
Apakah fungsi dari open yang berada di office<br>button?​
RSB [31]

untuk membuka file yang disimpan sebelumnya

8 0
3 years ago
Create a style rule for the page body that sets the width to 95% of the browser window ranging from 640 pixels up to 960 pixels.
Stels [109]

Answer:

body {

width: 95%;

min-width: 640px;

max-width: 960px ;

margin-left: auto;

margin-right: auto;

height: 100%

}

Explanation:

  • <em>body {</em>

represents the HTML tag that you want to style using CSS

There are two major ways to style a text it can either be fixed or fluid.

Fixed layout: The height and width are not flexible, it is specified by using pixels.

Fluid: The height and the width are flexible it  makes use of percentages and ems.

<em />

  • <em>width: 95%; </em>

<em>  min-width: 640px; </em>

<em>  max-width: 960px ;</em>

sets the width to 95% of the browser window and sets the pixel range  from 640 pixels up to 960 pixels.

  • <em>margin-left: auto; </em>

<em> margin-right: auto; </em>

these lines of code horizontally center the page body within the browser window by automatically setting the margin alignment.

  • <em>height: 100% </em>

it Set the minimum height of the browser window to 100% , ensuring that the height of the page body is always at least as high as the browser window itself.

6 0
3 years ago
Other questions:
  • Mitchell has noticed that his co-workers are unable to open attachments in the emails he sends. What is one possible reason for
    5·1 answer
  • Pixels are small dots in columns and rows that allow an image to be seen on a display screen.
    6·1 answer
  • With ________, website programmers can import data from other sources to create new functions and features that we associate wit
    14·1 answer
  • Technician A says that if the coefficient of friction is too low, the brakes will grab.
    12·1 answer
  • Ok so another weird question! So if you know what google drive is and how to upload a video why does it keep adding hours! it ke
    11·1 answer
  • Identify the false statement.
    8·1 answer
  • Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt and wri
    13·1 answer
  • What is the meaning of N.W.O​
    9·1 answer
  • You are asked to write a program that prompts the user for the size of two integer arrays, user input for the size must not exce
    13·1 answer
  • Why is it better for a CPU to have more than one cache?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!