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
Technician A says a solenoid is not used on modern automobiles. Technician B says fuel injectors and starter motor solenoids are
julia-pushkina [17]

Answer:

ON THE BOTTOM

Explanation:

red cord plus black cord

5 0
3 years ago
A system consists of a disk rotating on a frictionless axle
kakasveta [241]

The system includes a disk rotating on a frictionless axle and a bit of clay transferring towards it, as proven withinside the determine above.

<h3>What is the angular momentum?</h3>

The angular momentum of the device earlier than and after the clay sticks can be the same.

Conservation of angular momentum the precept of conservation of angular momentum states that the whole angular momentum is usually conserved.

  1. Li = Lf where;
  2. li is the preliminary second of inertia
  3. If is the very last second of inertia
  4. wi is the preliminary angular velocity
  5. wf is the very last angular velocity
  6. Li is the preliminary angular momentum
  7. Lf is the very last angular momentum

Thus, the angular momentum of the device earlier than and after the clay sticks can be the same.

Read more about the frictionless :

brainly.com/question/13539944

#SPJ4

8 0
2 years ago
This fluid may be mixed with engine oil for recycling.
alisha [4.7K]

Answer: D

Explanation:

5 0
3 years ago
Find the derivative of y = sin(ln(5x2 − 2x))
pickupchik [31]

Answer:

y = \cos[\ln x + \ln (5\cdot x - 2)]\cdot \left(\frac{1}{x} + \frac{5}{5\cdot x-2} \right)

Explanation:

Let y = \sin[\ln(5\cdot x^{2}-2\cdot x)] and we proceed to find the derivative by the following steps:

1) y = \sin[\ln(5\cdot x^{2}-2\cdot x)] Given

2) y = \sin [\ln[x\cdot (5\cdot x - 2)]] Distributive property

3) y = \sin[\ln x + \ln (5\cdot x - 2 )] \ln (a\cdot b) = \ln a + \ln b

4) y = \cos[\ln x + \ln (5\cdot x - 2)]\cdot \left(\frac{1}{x} + \frac{5}{5\cdot x-2} \right)  \frac{d}{dx} (\sin x) = \cos x/\frac{d}{dx}(\ln x) = \frac{1}{x}/\frac{d}{dx}(c\cdot x^{n}) = n\cdot c\cdot x^{n-1}/Rule of chain/Result

3 0
3 years ago
g Four primary sedimentation basins are designed for total average flow of 1.2 m3/s. The TSS concentration in the primary treate
fiasKO [112]

Answer:

Capacity for the sludge pump = 0.217 m³/min

Explanation:

Detailed explanation is given in the attached document.

5 0
3 years ago
Other questions:
  • A 1-lb collar is attached to a spring and slides without friction along a circular rod in a vertical plane. The spring has an un
    6·1 answer
  • Which pendulum will.mobe faster​
    13·1 answer
  • The _____ is a voice for small business.
    7·1 answer
  • A PMOS device with VT P = −1.2 V has a drain current iD = 0.5 mA when vSG = 3 V and vSD = 5 V. Calculate the drain current when:
    12·1 answer
  • Compare the tensile load capacity of a 5/16-18 UNC thread and a 5/16-24 UNF thread made of the same material.
    6·1 answer
  • Q1. In electronic circuits it is not unusual to encounter currents in the microampere range. Assume a 35 μA current, due to the
    13·1 answer
  • What is the purpose of a heater core
    5·2 answers
  • This manometer is used to measure the difference in water level between the two tanks.
    10·1 answer
  • What do u call a bad bird
    9·1 answer
  • What does an engineer do? List as many types of engineers as you can.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!