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
s344n2d4d5 [400]
3 years ago
11

2) Write a function called upsidedown_pyramid(height) that acceptsa parameter ""height"". It then prints an upside-down pyramid

of that height.(30

Engineering
1 answer:
DiKsa [7]3 years ago
7 0

Hello, you haven't provided the programing language in which you need the code, I'll explain how to do it using Python, and you can follow the same logic to make a program in the programing language that you need.

Answer:

# -*- coding: utf-8 -*-

#Python

def upsidedown_pyramid(height):

   maximun = (2*(height-1))+1

   for i in range(height): print(' '*i+'*'*(maximun-i*2)+' '*i)

Explanation:

  1. Define your function with an input parameter
  2. Define your maximum, because you are not printing a normal pyramid but an upside-down pyramid you are going to start printing from the maximum number of '*' to just one, but what exactly is the maximum number of '*'? Because you build a pyramid starting with one block, '*', and each level you add two more blocks your formula to calculate the maximum is (2*(height-1))+1
  3. Finally, you have to create a for loop to print each level. You need to start printing zero spaces and the maximum number of blocks, the next level you need two spaces and the maximum number of blocks minus two, and for each level that follows you are increasing by two the number of spaces, one left and one right, and decreasing by two the number of '*'

Note the constructing block of this pyramid is *

You might be interested in
Define the terms (a) thermal conductivity, (b) heat capacity and (c) thermal diffusivity
IceJOKER [234]

Explanation:

<u>(a)</u>

<u>The measure of material's ability to conduct thermal energy (heat) is known as thermal conductivity.</u> For examples, metals have high thermal conductivity, it means that they are very efficient at conducting heat.<u> The SI unit of heat capacity is W/m.K.</u>

The expression for thermal conductivity is:

q=-\kappa \bigtriangledown T

Where,

q is the heat flux

\kappa is the thermal conductivity

\bigtriangledown T is the temperature gradient.

<u>(b)</u>

<u>Heat capacity for a substance is defined as the ratio of the amount of energy required to change the temperature of the substance and the magnitude of temperature change. The SI unit of heat capacity is J/K.</u>

The expression for Heat capacity is:

C=\frac{E}{\Delta T}

Where,

C is the Heat capacity

E is the energy absorbed/released

\Delta T is the change in temperature

<u>(c)</u>

<u>Thermal diffusivity is defined as the thermal conductivity divided by specific heat capacity at constant pressure and its density. The Si unit of thermal diffusivity is m²/s.</u>

The expression for thermal diffusivity is:

\alpha=\frac{\kappa}{C_p \times \rho}

Where,

\alpha is thermal diffusivity

\kappa is the thermal conductivity

C_p is specific heat capacity at constant pressure

\rho is density

6 0
3 years ago
R-744 refrigerant is bad why
mars1129 [50]

Answer:

Explanation:

R-744 is seen as the 'perfect' natural refrigerant as it is climate neutral and there is not a flammability or toxicity risk. It is rated as an A1 from ASHRAE. While it is non-toxic there is still risk if a leak occurs in an enclosed area as R-744 will displace the oxygen in the room and could cause asphyxiation

6 0
3 years ago
A 4140 steel shaft, heat-treated to a minimum yield strength of 100 ksi, has a diameter of 1 7/16 in. The shaft rotates at 600 r
velikii [3]
Answer:










Explanation:



4140-40 I’d pick wood




I hope this helps! :)
4 0
3 years ago
Read 2 more answers
Three point bending is better than tensile for evaluating the strength of ceramics. a)-True b)- False
amid [387]

Answer:

a)-True

Explanation:

Three point bending is better than tensile for evaluating the strength of ceramics. It is got a positive benefit to tensile for evaluating the strength of ceramics.

5 0
3 years ago
1. In an assembly two flanges are held together by a 1/2"" bolt that is threaded into one of the flanges. (a) If the clearance h
creativ13 [48]

Answer:

The solution and complete explanation for the above question and mentioned conditions is given below in the attached document.i hope my explanation will help you in understanding this particular question.

Explanation:

5 0
3 years ago
Other questions:
  • What are the three main areas of bioengineering?
    11·1 answer
  • Chapter 15 – Fasteners: Determine the tensile load capacity of a 5/16 – 18 UNC thread and a 5/16 – 24 UNF thread made of the sam
    8·2 answers
  • Calculate the value of ni for gallium arsenide (GaAs) at T = 300 K. The constant B = 3. 56 times 1014 9cm -3 K-3/2) and the band
    9·1 answer
  • Two kilograms of air in a piston-cylinder assembly undergoes an isothermal process from an initial state of 200K, 300kPa to 600k
    8·1 answer
  • A non-entrepreneurship, work-based, agricultural type of SAE, in which a student learns and gains skills in a paid or unpaid pos
    15·1 answer
  • The impeller shaft of a fluid agitator transmits 28 kW at 440 rpm. If the allowable shear stress in the impeller shaft must be l
    6·1 answer
  • Might give brainliest
    8·1 answer
  • Is A fine by the EPA may be imposed on the employer or
    8·1 answer
  • Hello, so I have a watch and I don't know where the plugin for the charger is, or what brand it is. Please do help and please DO
    11·1 answer
  • You insert a dielectric into an air-filled capacitor. How does this affect the energy stored in the capacitor?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!