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]
3 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]3 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
What is the velocity of flow in an asphalt channel that has a hydraulic radius of 3.404 m, length of 200 m and bed slope of 0.00
yKpoI14uk [10]

Answer:

The velocity of flow is 10.0 m/s.

Explanation:

We shall use Manning's equation to calculate the velocity of flow

Velocity of flow by manning's equation is given by

V=\frac{1}{n}R^{2/3}S^{1/2}

where

n = manning's roughness coefficient

R = hydraulic radius

S = bed slope of the channel

We know that for an asphalt channel value of manning's roughness coefficient = 0.016

Applying values in the above equation we obtain velocity of flow as

V=\frac{1}{0.016}\times 3.404^{2/3}\times 0.005^{1/2}\\\\\therefore V=10.000m/s

7 0
3 years ago
An 1800-W toaster, a 1400-W electric frying pan, and a 75-W lamp are plugged into the same outlet in a 15-A, 120-V circuit. The
Mila [183]

Answer:

a) Current drawn by the toaster = 15A

Current drawn by the electric frying pan = 11.67A

Current drawn by the lamp = 0.625A

b) This combination will blow the 15A fuse as the total current requirement for this setup exceeds the 15A rating of the fuse.

Explanation:

a) For parallel connection, there exists, the same voltage and different currents across all the devices.

Voltage cross each of the 3 devices = outlet voltage of 120V

From their respective power rating, current drawn by each device will be calculated.

P = IV

For the toaster, P = 1800 W, V = 120V

I = 1800/120 = 15A

For the electric frying pan, P = 1400 W, V = 120 V

I = 1400/120 = 11.67 A

For the lamp, P = 75 W, V = 120V

I = 75/120 = 0.625 A

b) Total current in a parallel connection setup = Sum total of all the currents.

Total current drawn by all 3 devices = 15 + 11.67 + 0.625 = 27.295A = 27.3 A

This total current requirement surpasses the 15A current rating of the fuse, therefore, this combination will blow the fuse.

Hope this Helps!!!

6 0
3 years ago
If it is desired to lay off a distance of 10,000' with a total error of no more than ± 0.30 ft. If a 100' tape is used and the
Ira Lisetskai [31]

Answer:

± 0.003 ft

Explanation:

Since our distance is 10,000 ft and we need to use a full tape measure of 100 ft. We find that 10,000 = 100 × 100.

Let L' = our distance and L = our tape measure

So, L' = 100L

Now by error determination ΔL' = 100ΔL

Now ΔL' = ± 0.30 ft

ΔL = ΔL'/100

= ± 0.30 ft/100

= ± 0.003 ft

So, the maxim error per tape is ± 0.003 ft

3 0
3 years ago
Briefly explain how a jet moves
sergejj [24]

Answer:

Jet engines move the airplane forward with a great force that is produced by a tremendous thrust and causes the plane to fly very fast. All jet engines, which are also called gas turbines, work on the same principle. The engine sucks air in at the front with a fan. ... Spinning the turbine causes the compressor to spin.

Explanation:

yw

8 0
2 years ago
What are the indicators of ineffective systems engineering?
liberstina [14]

Answer:

Indicators for ineffective system engineering are as follows

1.Requirement trends

2.System definition change backlog trends

3.interface trends

4.Requirement validation trends

5.Requirement verification trends

6.Work product approval trends

7.Review action closure trends

8.Risk exposure trends

9.Risk handling trends

10.Technology maturity trends

11.Technical measurement trends

12.System engineering skills trends

13.Process compliance trends

7 0
3 years ago
Other questions:
  • A petrol engine produces 20 hp using 35 kW of heat transfer from burning fuel. What is its thermal efficiency, and how much powe
    14·1 answer
  • Air expands through an ideal turbine from 1 MPa, 900 K to 0.1 MPa, 500K. The inlet velocity is small compared to the exit veloci
    10·1 answer
  • You're running an engine and seeing that it is exhausting blue smoke. Which is likely to
    9·1 answer
  • What type of fuel does a 2 cycle engine use
    5·1 answer
  • WARNING:<br><br> when people put links in the answer it is a virus DO NOT DOWNLOAD IT
    15·2 answers
  • a coil consists of 200 turns of copper wire and has a cross-sectional area of 0.8mm square . The mean length per turn is 80 cm a
    5·1 answer
  • When asked about favorite Thanksgiving leftovers, 9% of the people said turkey and 7100 said mashed potatoes. Which food is more
    7·1 answer
  • Which is a better hydraulic cross section for an open channel: one with a small or a large hydraulic radius?
    13·1 answer
  • Does anyone know how to fix this? It's a chromebook and project where I have to try to fix it​
    9·1 answer
  • What is the correct procedure for mounting the m240 on the m122a1 tripod after the pintle is attached to the receiver?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!