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
NARA [144]
3 years ago
14

Write a program and flowchart. The program should ask the user for the average temperature in each of the last 12 months. After

the user has entered the temperatures, the program should display them. Use a "for" loop to ask for the data, and use another "for" loop to display the data. Store the data in an array called "temperature."Here is what the output looks like.

Computers and Technology
1 answer:
Afina-wow [57]3 years ago
5 0

#First we define the variables to house the temperatures

#temp is an empty array that will be used to store the temperature

Temp = []

#The months is defined as stated below

months = 12

#Ask the user for the temperature input and unit if possible

print("Kindly enter the temperature here")

#the program enter loop to get the temperatures.

for x in range(months):  

   InitTemp = str(input("Kindly add the unit behind the number .eg C for celcius"))

   Temp.append(InitTemp)

j=0

for x in range(len(Temp)):  

   j=j+1

   print("The Temperature is", " ", Temp[x], "for the ", j, "Month" )

#there is an attached photo for the flowchart

You might be interested in
Create a file account.cpp containing a Bank Account Class.
Daniel [21]

Answer:

#include <iostream>

using namespace std;

class BankAccount {

  string name = name;

  double balance = balance;

  BankAccount( string name, double balance ) {

    string name = name;

    double balance = balance;

     return 0;

  }

  string getName( ){

     return name;

  }

  double getbalance( ) {

     return balance;

  void setName( string username){

     name = username;

  }

  void setbalance( double newBalance){

     balance = newBalance;

  }

int main( ) {

  BankAccount user1(John, 0.0);

  BankAccount user2(Jane, 0.0);

  user1.setbalance( 2300.00)

  user2.setbalance( 4300.00)

  cout << user1.getname() << user1.getbalance();

  cout << user1.getname() << user1.getbalance();

}

Explanation:

The C source code above using a class to create a data structure of a bank account user name and balance. The attribute name and balance are private to the class and can be retrieved and modified through the get and set methods.

3 0
3 years ago
Practising some questions for board exams for class 12 python,pls help with detailed answer
poizon [28]
I do t know the answer to this but i think tou can firger it iut food luck
3 0
3 years ago
Help me with the question please..​
PIT_PIT [208]

First addition, then division

4 0
3 years ago
Why should a user preview the document before printing?​
Margarita [4]
The user should preview a document first to make sure the layout is correct, so as not to waste paper if a font size or layout is incorrect.
5 0
3 years ago
Read 2 more answers
What will be the results from running the following code?
kari74 [83]

Answer:syntax error

Explanation:

Correct on edg 2021

4 0
3 years ago
Other questions:
  • Which string method counts the number of characters in a string?
    5·1 answer
  • A Trojan horse is a program that copies itself repeatedly using up resources and potentially shutting down a network. true or fa
    11·1 answer
  • A client-server relationship is the basic form of a ____?
    15·1 answer
  • The ____ preceding a formula alerts excel that you are entering a formula or function and not text
    14·1 answer
  • With _______, applications are owned, delivered and managed remotely by one or more providers over the Internet or an intranet,
    15·1 answer
  • Describe three perimeter intrusion detection systems and give an example of one that you have seen deployed either at work or an
    8·1 answer
  • How many questions have you seen so far other than this one?
    10·2 answers
  • Old systems can be useful when designing new computer software.<br> True or False
    7·2 answers
  • bro i got banned for posting an amazing bulk pic, but this dude literally posted an inappropriate, dafuq is wrong with this bann
    8·2 answers
  • Direction: Read each item carefully and choose the letter of the correct answer. Write your answers on a separate sheet of paper
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!