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

Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product.

Computers and Technology
2 answers:
lesya692 [45]3 years ago
6 0

try:

   num = int(input("Enter a number: "))

   print(12*num)

except ValueError:

   print("Please enter a number!")

I wrote my code in python 3.8

Dafna11 [192]3 years ago
6 0

Answer:

num = int(input("Enter a number: "))

print(12*num)

print("Please enter a number!")

Explanation:

You might be interested in
Inc AX,2 is valid in assembly language ?
masya89 [10]

Answer:

in most so yes

Explanation:

4 0
2 years ago
Providing incentives for customers to learn more about your service is known as?
Julli [10]
B) Advertising is the answer
3 0
3 years ago
g Write a program that prompts the user for an integer n between 1 and 100. If the number is outside the range, it prints an err
grin007 [14]

Answer:

The cpp program is given below.

#include<iostream>

#include<iomanip>

using namespace std;

int main() {

   

   // variables declared

   int n;

   int sum=0;

   float avg;

   

   do

   {

       // user input taken for number    

       cout<< "Enter a number between 1 and 100 (inclusive): ";

       cin>>n;

       

       if(n<1 || n>100)

           cout<<" Number is out of range. Enter valid number."<<endl;

       

   }while(n<1 || n>100);

   

   cout<<" "<<endl;

   

   // printing even numbers between num and 50  

   for(int num=1; num<=n; num++)

   {

       sum = sum + num;

   }

   

   avg = sum/n;

   

   // displaying sum and average

   cout<<"Sum of numbers between 1 and "<<n<<" is "<<sum<<endl;

   cout<<"Average of numbers between 1 and "<<n<<" is ";

   printf("%.2f", avg);

   

       return 0;

}

OUTPUT

Enter a number between 1 and 100 (inclusive): 123

Number is out of range. Enter valid number.

Enter a number between 1 and 100 (inclusive): 56

 

Sum of numbers between 1 and 56 is 1596

Average of numbers between 1 and 56 is 28.00

Explanation:

The program is explained below.

1. Two integer variables are declared to hold the number, n, and to hold the sum of numbers from 1 to n, sum. The variable sum is initialized to 0.

2. One float variable, avg, is declared to hold average of numbers from 1 to n.

3. User input is taken for n inside do-while loop. The loop executes till user enters value between 1 and 100. Otherwise, error message is printed.

4. The for loop executes over variable num, which runs from 1 to user-entered value of n.

5. Inside for loop, all the values of num are added to sum.

sum = sum + num;

6. Outside for loop, average is computed and stored in avg.

avg = sum/n;

7. The average is printed with two numbers after decimal using the following code.

printf("%.2f", avg);

8. The program ends with return statement.

9. All the code is written inside main() and no classes are involved.

3 0
3 years ago
After turning volume all the way up on your computer speaker you still can’t hear any sound. What should be done next
wariber [46]

Answer:

check to see if you have headphones or snything plug in to it that might take the sound if not try restarting your computer, or your speakers are broken with water damage or over use

Explanation:

4 0
3 years ago
What is the name of the image window area that identifies the project you are working on?
Natali5045456 [20]
The answer is the title bar becuase it would tell the name of the project or something else such as when you are using Words then it would tell you the name of the title of the document you are doing.
6 0
3 years ago
Read 2 more answers
Other questions:
  • ___ are controls through which a user can enter input data in a gui application. answer
    10·1 answer
  • ) How many switching functions of two variables (x and y) are there?
    11·1 answer
  • Label 14 parts of the inside of a computer
    6·1 answer
  • What is distribution hardware?
    14·1 answer
  • What are the features of G-mail <br><br>(Write in your own words)​
    10·2 answers
  • Bored can you talk to me
    5·2 answers
  • List six features of the Microsoft ​
    10·1 answer
  • Pls answer will give brainlest dont answer if you dont know Upload your 300-word essay containing the following: the definition
    5·1 answer
  • Which problem is least likely to be solved through grid computing?.
    9·1 answer
  • Can someone give me an earsketch song of summer to turn in
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!