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
alexandr402 [8]
2 years ago
7

5. Create a function named second_a that uses a list comprehension. The function will take a single integer parameter n. Find ev

ery number from 1 to n (inclusive) that is a palindrome which starts with the digit 3. Do not user a helper function.
Engineering
1 answer:
Mekhanik [1.2K]2 years ago
8 0

Answer:

//Program was implemented using C++ Programming Language

// Comments are used for explanatory purpose

#include<iostream>

using namespace std;

unsigned int second_a(unsigned int n)

{

int r,sum=0,temp;

int first;

for(int i= 1; I<=n; i++)

{

first = n;

//Check if first digit is 3

// Remove last digit from number till only one digit is left

while(first >= 10)

{

first = first / 10;

}

if(first == 3) // if first digit is 3

{

//Check if n is palindrome

temp=n; // save the value of n in a temporary Variable

while(n>0)

{

r=n%10; //getting remainder

sum=(sum*10)+r;

n=n/10;

}

if(temp==sum)

cout<<n<<" is a palindrome";

else

cout<<n<<" is not a palindrome";

}

}

}

Explanation:

The above code segments is a functional program that checks if a number that starts with digit 3 is Palindromic or not.

The program was coded using C++ programming language.

The main method of the program is omitted.

Comments were used for explanatory purpose.

You might be interested in
Air enters the combustor of a jet engine at p1=10 atm, T1=1000°R, and M1=0.2. Fuel is injected and burned, with a fuel/air mass
snow_lady [41]

Answer:

M2 = 0.06404

P2 = 2.273

T2 = 5806.45°R

Explanation:

Given that p1 = 10atm, T1 = 1000R, M1 = 0.2.

Therefore from Steam Table, Po1 = (1.028)*(10) = 10.28 atm,

To1 = (1.008)*(1000) = 1008 ºR

R = 1716 ft-lb/slug-ºR cp= 6006 ft-lb/slug-ºR fuel-air ratio (by mass)

F/A =???? = FA slugf/slugaq = 4.5 x 108ft-lb/slugfx FA slugf/sluga = (4.5 x 108)FA ft-lb/sluga

For the air q = cp(To2– To1)

(Exit flow – inlet flow) – choked flow is assumed For M1= 0.2

Table A.3 of steam table gives P/P* = 2.273,

T/T* = 0.2066,

To/To* = 0.1736 To* = To2= To/0.1736 = 1008/0.1736 = 5806.45 ºR Gives q = cp(To* - To) = (6006 ft-lb/sluga-ºR)*(5806.45 – 1008)ºR = 28819500 ft-lb/slugaSetting equal to equation 1 above gives 28819500 ft-lb/sluga= FA*(4.5 x 108) ft-lb/slugaFA =

F/A = 0.06404 slugf/slugaor less to prevent choked flow at the exit

5 0
2 years ago
. Using the Newton Raphson method, determine the uniform flow depth in a trapezoidal channel with a bottom width of 3.0 m and si
Over [174]

Answer:

y  ≈ 2.5

Explanation:

Given data:

bottom width is 3 m

side slope is 1:2

discharge is 10 m^3/s

slope is 0.004

manning roughness coefficient is 0.015

manning equation is written as

v =1/n R^{2/3} s^{1/2}

where R is hydraulic radius

S = bed slope

Q = Av =A 1/n R^{2/3} s^{1/2}

A = 1/2 \times (B+B+4y) \times y =(B+2y) y

R =\frac{A}{P}

P is perimeter =  (B+2\sqrt{5} y)

R =\frac{(3+2y) y}{(3+2\sqrt{5} y)}

Q = (2+2y) y) \times 1/0.015 [\frac{(3+2y) y}{(3+2\sqrt{5} y)}]^{2/3} 0.004^{1/2}

solving for y100 =(2+2y) y) \times (1/0.015) [\frac{(3+2y) y}{(3+2\sqrt{5} y)}]^{2/3} \times 0.004^{1/2}

solving for y value by using iteration method ,we get

y  ≈ 2.5

5 0
3 years ago
Can some help me with this !!! Is 26 points!!
Aleonysh [2.5K]
Third one
15,000,000 ohms because M=10^6
8 0
2 years ago
In which type of shoot is continuous lighting used?
Fiesta28 [93]

A type of shoot in which continuous lighting used is: 1) studio.

<h3>What is a photoshoot?</h3>

A photoshoot simply refers to a photography session which typically involves the use of digital media equipment such as a camera, to take series of pictures (photographs) of models, group, things or places, etc., especially by a professional photographer.

<h3>The types of shoot.</h3>

Basically, there are four main type of shoot and these include the following:

  • Studio
  • Underwater
  • Action
  • Landscape

In photography, a type of shoot in which continuous lighting used is studio because it enhances the photographs.

Read more on photography here: brainly.com/question/24582274

#SPJ1

4 0
1 year ago
A heat pump cycle whose coefficient of performance is 2.5 delivers energy by heat transfer to a dwelling at a rate of 20kW.
12345 [234]

Answer:

a) 8kW

b) $128

Explanation:

Given the coefficient of performance of the heat pump cycle to be 2.5

Energy delivered by the heat pump = 20kW

a) net power required to operate the heat pump = Energy delivered / coefficient of performance

Net power required = 20/2.5

= 8kW

b) Given the cost of electricity is $0.08 for 1kWhour

Since net power required to operate heat pump = 8kW

If the heat pump operate for 200hours, total power required for a month = 8kW×200hours = 1600kWhour

since 1kWh of electricity costs $0.08, cost of electricity used in a month when the pump operates for 200hour will be 1600kWh×$0.08 which is equivalent to $128

8 0
3 years ago
Other questions:
  • Primary Creep: slope (creep rate) decreases with time
    10·1 answer
  • A evolução da malha rodoviária do Brasil é um marco notável
    9·1 answer
  • We would like to measure the density (p) of an ideal gas. We know the ideal gas law provides p= , where P represents pressure, R
    15·1 answer
  • The biggest advantage of sketches is that
    14·1 answer
  • Global Convection Patterns include which of the following?
    12·1 answer
  • In addition to passing an ASE certification test, automotive technicians must have __________ year(s) of on the job training or
    15·1 answer
  • Can you solve this question​
    11·2 answers
  • What are the searching algorithms used by search engines?
    11·1 answer
  • What is differentiation​
    12·1 answer
  • Technician a s ays both an ohmmeter and a self-powered test light may be used to test for continuity. technician b says both may
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!