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

Enter the cube's edge: 4 The surface area is 96 square units. Python

Computers and Technology
1 answer:
mr_godi [17]3 years ago
5 0

Answer:

See the program code below.

Explanation:

def cube_SA(edge):

 edge = int(input("Enter the cube's edge: "))

 sa = edge * edge * 6

 print("The surface area is {} square units".format(sa))

cube_SA(4)

Best Regards!

You might be interested in
Write a program named as calcPrice.c that formats product information entered by the user and calculate the total amount of purc
Colt1911 [192]

Answer:

Here is the calcPrice.c program:

#include <stdio.h>   //to use input output functions

int main(void)  {  //start of main method

   int itemNo, month, day, year, quantity;  //declares variables to hold item number, quantity, and date

   float unitPrice; //declare variable to hold price per unit

   printf("Enter item number: ");  // prompts user to enter item number

   scanf("%d", &itemNo);  //reads item number from user and stores it in itemNo variable

   printf("Enter unit price: ");  // prompts user to enter unit price

   scanf("%f", &unitPrice);  //reads input unit price and stores it in unitPrice variable

   

    printf("Enter quantity: ");  //prompts user to enter quantity

   scanf("%d", &quantity);  //reads input quantity and stores it in quantity variable

   printf("Enter purchase date (mm/dd/yyyy): ");  //prompts user to enter purchase date

   scanf("%d/%d/%d", &month, &day, &year);  //reads input date and stores it in month, day and year variables

    float totalAmount = unitPrice * quantity;  //computes the total amount

   printf("\nItem\tUnit Price\tQTY\tPurchase Date\tTotal Amount\n");  //displays the item, unit price, qty, purchase data and total amount with tab space between each

   printf("%d\t$%5.2f\t%d\t%.2d/%.2d/%d\t$%5.2f\n", itemNo, unitPrice,quantity, month, day, year,totalAmount);   }    //displays the values of itemNo, unitPrice, quantity, month, day, year and computed totalAmount with tab space between each

Explanation:

Lets suppose user enters 583 as item number, 13.5 as unit price, 2 as quantity and 09/15/2016 as date so

itemNo = 583

unitPrice = 13.5

quantity = 2

month = 09

day = 15

year = 2016

totalAmount is computed as:

  totalAmount = unitPrice * quantity;

 totalAmount = 13.5* 2

totalAmount = 27.00

Hence the output of the entire program is:

Item    Unit Price      QTY     Purchase Date   Total Amount      

583     $  13.50           2           09/15/2016         $  27.00  

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

4 0
3 years ago
Copy the countdown function from Section 5.8 of your textbook. def countdown(n): if n &lt;= 0: print('Blastoff!') else: print(n)
Lapatulllka [165]

Answer:

def countdown(n):

   if n <= 0:

       print('Blastoff!')

   else:

       print(n)

       countdown(n-1)

       

def countup(n):

   if n >= 0:

       print('Blastoff!')

   else:

       print(n)

       countup(n+1)

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

if number >= 0:

   countdown(number)

elif number < 0:

   countup(number)

<u>Outputs:</u>

Enter a number: 3                                                                                                              

3                                                                                                                              

2                                                                                                                              

1                                                                                                                              

Blastoff!

Enter a number: -3                                                                                                              

-3                                                                                                                              

-2                                                                                                                              

-1                                                                                                                              

Blastoff!

Enter a number: 0

Blastoff!

For the input of zero, the countdown function is called.

Explanation:

Copy the countdown function

Create a function called countup that takes one parameter, n. The function counts up from n to 0. It will print the numbers from n to -1 and when it reaches 0, it will print "Blastoff!".

Ask the user to enter a number

Check if the number is greater than or equal to 0. If it is, call the countdown function. Otherwise, call the countup function.

4 0
2 years ago
GIVING BRAINLIEST
irakobra [83]

Answer:

A: Radio waves.

Explanation:

Computers use short-wave radio in order to communicate with devices in it's immediate vicinity.

8 0
2 years ago
Which of the following is as result of division of Labour​
neonofarm [45]

Answer:

Specialization

Explanation:

6 0
3 years ago
How do you render and export files on blender
Debora [2.8K]

Answer:

Save your Blender file (. blend) in the same folder as your . obj file, if you didn't already.

Click on File/External Data/Pack All into . blend.

Click on File/External Data/Unpack All Into Files.

Choose "Use files in current directory (create when necessary)"

Explanation:

<em>Hope </em><em>it </em><em>helps </em><em>ya </em><em>ItzAlex</em>

6 0
3 years ago
Other questions:
  • I NEED HELP NOW PLEASE!!!!!!
    6·2 answers
  • Which ipv6 router message is sent via multicast with a scope of link-local with the expectation that all local routers will iden
    5·1 answer
  • Which finger types the return or enter key?
    6·2 answers
  • How are IP addresses usually written?
    7·1 answer
  • What is the difference between private inheritance and composition?
    11·1 answer
  • Select the correct answer.
    10·1 answer
  • Multiple choice:
    12·2 answers
  • What code would you use to create the login button?
    11·1 answer
  • Which of the following is NOT a reason we use subprograms?
    7·1 answer
  • The web design teams of a company are working on designing websites for various companies, Pick the ideas that employ proper use
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!