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
It is desired to produce and aligned carbon fiber-epoxy matrix composite having a longitudinal tensile strength of 630 MPa. Calc
ratelena [41]

Answer:

The answer is below

Explanation:

Given that:

Diameter (D) = 0.03 mm = 0.00003 m, length (L) = 2.4 mm = 0.0024 m, longitudinal tensile strength (\sigma_{cd})=630\ MPa = 630*10^6\ Pa, Fracture strength

(\sigma_f)=5100\ MPa=5100*10^6\ Pa,fiber-matrix\ stres(\sigma_m)=17.5\ MPa=17.5*10^6\ Pa,matrix\ strength=\tau_c=17\ MPa=17 *10^6\ Pa

a) The critical length (L_c) is given by:

L_c=\sigma_f*(\frac{D}{2*\tau_c} )=5100*10^6*\frac{0.00003}{2*17*10^6}=0.0045\ m=4.5\ mm

The critical length (4.5 mm) is greater than the given length, hence th composite can be produced.

b) The volume fraction (Vf) is gotten from the formula:

\sigma_{cd}=\frac{L*\tau_c}{D}*V_f+\sigma_m(1-V_f)\\\\V_f=\frac{\sigma_{cd}-\sigma_{m}}{\frac{L*\tau_c}{D}-\sigma_{m}}  \\\\Substituting:\\\\V_f=\frac{630*10^6-17.5*10^6}{\frac{0.0024*17*10^6}{0.00003} -17.5*10^6} \\\\V_f=0.456

6 0
3 years ago
You are driving on a road where the speed limit is 35 mph. If you want to make a turn, you must start to signal at least _______
stich3 [128]
I believe it’s D) 20 feet
3 0
3 years ago
Explain the process of energy conversion by describing how energy was converted from the windmill design brief. Discuss the diff
cupoosta [38]

Answer:

Wind energy is converted to Mechanical energy  which is then converted in to  electrical energy

Explanation:

In a wind mill the following energy conversions take place

a) Wind energy is converted into Mechanical energy (rotation of rotor blades)

b) Mechanical energy is converted into electrical energy (by using electric motor)

This electrical energy is then used for transmission through electric lines.

6 0
2 years ago
4. A banking system provides users with several services:
VLD [36.1K]

A diagram showing a use case diagrams for these requirements is given in the image attached.

<h3>What is system Case diagram?</h3>

A use case diagram is known to be a kind of graphical illustration of a users in terms of their various possible association or interactions within any given system.

A use case diagram in banking can be used to prepare, depict and also to know all the functional requirements of the banking system.

Therefore, Give the use case specification for the banking system services and paying a bill online is given in the image attached.

Learn  more about Case diagram from

brainly.com/question/12975184

#SPJ1

4 0
2 years ago
What is the definition of a duty cycle?
ira [324]

Answer:

D=\frac{PW}{T}*100

Explanation:

In electrical terms, is the ratio of time in which a load or circuit is ON compared to the time in which the load or circuit is OFF.

The duty cycle or power cycle, is expressed as a percentage of the activation time. For example, a 70% duty cycle is a signal that 70% of the time is activated and the other 30% disabled. Its equation can be expressed as:

D=\frac{PW}{T}*100

Where:

D=Duty\hspace{3}Cycle

PW=Pulse\hspace{3}Active\hspace{3}Time

T=Period\hspace{3}of\hspace{3}the\hspace{3}Signal

Here is a picture that will help you understand these concepts.

5 0
3 years ago
Other questions:
  • A Michelson interferometer operating at a 500 nm wavelength has a 3.73-cm-long glass cell in one arm. To begin, the air is pumpe
    9·1 answer
  • It is known that the connecting rod AB exerts on the crank BCa 2.5-kN force directed down andto the left along the centerline of
    12·1 answer
  • Convert 0.025 in into mm.
    11·2 answers
  • ____ technologies are new technologies that are not currently widely employed.
    15·2 answers
  • All of the following are categories for clutch covers except
    11·1 answer
  • Write a script (Program 2) to perform t he following matrix operations. Use output commands to clearly output each problem with
    15·1 answer
  • La probabilidad de que un nuevo producto tenga éxito es de 0.85. Si se eligen 10 personas al azar y se les pregunta si compraría
    12·1 answer
  • Which of the following machine parts always require
    12·1 answer
  • Recall the steps of the engineering design process. Compare and contrast the
    9·1 answer
  • Valorant Or Csgo? which is best in your opinion?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!