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
(a) Draw the Moore finite state machine (FSM) of an electronic combination lock with a RESET button, two number buttons (0 and 1
Dafna11 [192]

Answer:

Explanation:

There are a total of 6 states and 3 bits in this problem. Whenever the Reset button is pressed, RESET state is called otherwise the state according to the diagram is called. For the combination to be "01011", the input sequence has to be in the same order. If 0 is pressed instead of 1 in state "010", the last state of output ending with 0 will be called and likewise in all the states that follow.

7 0
3 years ago
A satellite at a distance of 36,000 km from an earth station radiates a power of 10 W from an
notsponge [240]
This an example solved please follow up with they photo I sent ok

4 0
3 years ago
Experimental Design Application Production engineers wish to find the optimal process for etching circuit boards quickly. They c
Veseljchak [2.6K]

Answer:

Hello your question is incomplete attached below is the missing part and answer

options :

Effect A

Effect B

Effect C

Effect D

Effect AB

Effect AC

Effect AD

Effect BC

Effect BD

Effect CD

Answer :

A  = significant

 B  = significant

C  = Non-significant

D  = Non-significant

AB  = Non-significant

AC  = significant

AD  = Non-significant

BC  = Non-significant

 BD  = Non-significant

 CD = Non-significant

Explanation:

The dependent variable here is Time

Effect of A  = significant

Effect of B  = significant

Effect of C  = Non-significant

Effect of D  = Non-significant

Effect of AB  = Non-significant

Effect of AC  = significant

Effect of AD  = Non-significant

Effect of BC  = Non-significant

Effect of BD  = Non-significant

Effect of CD = Non-significant

8 0
3 years ago
Steam enters an adiabatic condenser (heat exchanger) at a mass flow rate of 5.55 kg/s where it condensed to saturated liquid wat
Evgen [1.6K]

Answer:

The minimum mass flow rate will be "330 kg/s".

Explanation:

Given:

For steam,

m_{s}=5.55 \ kg/s

\Delta h=2491 \ kg/kj

For water,

\Delta T=10^{\circ}C

(Cp)_{w}=4.184 \ kJ/kg^{\circ}C

They add energy efficiency as condenser becomes adiabatic, with total mass flow rate of minimal vapor,

⇒  m_{s}\times (\Delta h)=M_{w}\times(Cp)_{w}\times \Delta T

On putting the estimated values, we get

⇒  5.55\times 2491=M_{w}\times 4.184\times 10\\

⇒  13825.05=M_{w}\times 41.84

⇒  M_{w}=330 \ kg/s

7 0
3 years ago
It is appropriate to use the following yield or failure criterion for ductile materials (a) Maximum shear stress or Tresca crite
Nataly [62]

Answer:

(b)Distortion energy theory.

Explanation:

The best suitable theory for ductile material:

       (1)Maximum shear stress theory (Guest and Tresca theory)

It theory state that applied maximum shear stress should be less or equal to its maximum shear strength.

      (2)Maximum distortion energy theory(Von Mises henkey's        theory)

It states that maximum shear train energy per unit volume at any point  is equal to strain energy per unit volume under the state of uni axial stress condition.

But from these two Best theories ,suitable theory is distortion energy theory ,because it gives best suitable result for ductile material.

6 0
2 years ago
Other questions:
  • A PV battery system has an end-to-end efficiency of 77%. The system is used to run an all-AC load that is run only at night. The
    11·1 answer
  • Refrigerant-134a enters a diffuser steadily as saturated vapor at 600 kPa with a velocity of 160 m/s, and it leaves at 700 kPa a
    10·2 answers
  • The water requirement for Class H cement is 38% (i.e.,water (%) by weight of cement),whereas the water requirement for barite is
    7·1 answer
  • For a copper-silver alloy of composition 25 wt% Ag-75 wt% Cu and at 775°C (1425°F) do the following:
    15·1 answer
  • Communication "works" to the degree that a wide variety of information is completely and thoroughly shared among the parties, an
    13·1 answer
  • If my friend have the corona what do I do
    11·2 answers
  • This app, I'm done, bye... I can't, bye
    11·1 answer
  • Hi, can anyone draw me an isometric image of this shape?​
    7·2 answers
  • Assignment # 2
    5·1 answer
  • GMA MIG weiding is a
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!