Answer:
// This program is written in C++ programming language
// Comments are used for explanatory purpose
/* The aim of this program is to to remove all the white space,digits, punctuation, and other special characters, leaving only the letters. */
// Program starts here
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
// Declare Variable of 100 characters
char word[100];
// Prompt user for input
cout<<"Your input goes here (max, 100 characters)";
cin>>word;
// Iterate through string to check for non alphabetic characters
for (int i = 0; word[i] != '\0'; ++i) {
// Check for uppercase and lowercase letters
while (!((word[i] >= 'a' && word[i] <= 'z') || (word[i] >= 'A' && word[i] <= 'Z') || word[i] == '\0')) {
for (int j = i; word[j] != '\0'; ++j) {
word[j] = word[j + 1];
}
word[j] = '\0';
}
}
cout<<"The resulting compressed string: "<<word;
return 0;
}
Answer:
w = str(input("input your values: "))
values = ' '.join(filter(str.isalpha, w))
while len(w) < 100:
print(values)
break
Explanation:
The code is written in python
w = str(input("input your values: "))
This code ask the user to input any string values with characters, numbers, line spaces , letters etc.
values = ' '.join(filter(str.isalpha, w))
This code filters the inputted value to bring only letters. All the letter are then joined together
while len(w) < 100:
The code check if the inputted value is less than 100 characters. While it is less than 100 characters. If it is less than 100 character the next code will function.
print(values)
This code prints the joined letters after checking with a while loop to confirm the length of character is less than 100
break
The break function breaks the code whether it print the values or not.
Generally, the letters will only be printed if the character inputted is less than 100 and later break the while loop or will not print any letter if the character is greater than 100 and later break.
Answer:
il(t) = e^(-100t)
Explanation:
The current from the source when the switch is closed is the current through an equivalent load of 15 + 50║50 = 15+25 = 40 ohms. That is, it is 80/40 = 2 amperes. That current is split evenly between the two parallel 50-ohm resistors, so the initial inductor current is 2/2 = 1 ampere.
The time constant is L/R = 0.20/20 = 0.01 seconds. Then the decaying current is described by ...
il(t) = e^(-t/.01)
il(t) = e^(-100t) . . . amperes
Answer:
The answer is below
Explanation:
A 4-pole, 3-phase induction motor operates from a supply whose frequency is 60 Hz. calculate: 1- the speed at which the magnetic field of the stator is rotating. 2- the speed of the rotor when the slip is 0.05. 3- the frequency of the rotor currents when the slip is 0.04. 4- the frequency of the rotor currents at standstill.
Given that:
number of poles (p) = 4, frequency (f) = 60 Hz
1) The synchronous speed of the motor is the speed at which the magnetic field of the stator is rotating. It is given as:
2) The slip (s) = 0.05
The speed of the motor (n) is the speed of the rotor, it is given as:
3) s = 0.04
The rotor frequency is the product of the supply frequency and slip it is given as:
4) At standstill, the motor speed is zero hence the slip = 1:
The rotor frequency is the product of the supply frequency and slip it is given as:
Answer:
t = 25.10 sec
Explanation:
we know that Avrami equation
here Y is percentage of completion of reaction = 50%
t is duration of reaction = 146 sec
so,
taking natural log on both side
ln(0.5) = -k(306.6)
for 86 % completion
t = 25.10 sec
Fluorescent lamps
Mercury-containing lamps
All of the above
Answer: D all above
Explanation:
Jus done it
Answer:
//This Program is written in C++
// Comments are used for explanatory purpose
#include <iostream>
using namespace std;
enum mailbox{open, close};
int box[149];
void closeAllBoxes();
void OpenClose();
void printAll();
int main()
{
closeAllBoxes();
OpenClose();
printAll();
return 0;
}
void closeAllBoxes()
{
for (int i = 0; i < 150; i++) //Iterate through from 0 to 149 which literarily means 1 to 150
{
box[i] = close; //Close all boxes
}
}
void OpenClose()
{
for(int i = 2; i < 150; i++) {
for(int j = i; j < 150; j += i) {
if (box[j] == close) //Open box if box is closed
box[j] = open;
else
box[j] = close; // Close box if box is opened
}
}
// At the end of this test, all boxes would be closed
}
void printAll()
{
for (int x = 0; x < 150; x++) //use this to test
{
if (box[x] = 1)
{
cout << "Mailbox #" << x+1 << " is closed" << endl;
// Print all close boxes
}
}
}
Explanation:
The solution is in the attachment
Answer:
please find attached.
Explanation: