Answer:
158.6 J
Explanation:
given,
distance = 8.7 m
force = 28 N
energy increased by 85 J
work done by the force = force * distance
work done by the force = 28 * 8.7
work done by the force = 243.6 J
work done on cube = 85 J
work done on floor = x J
total work done = 85+ x
243.6 J = 85J + x
x = 158.6 J
increase in the thermal energy of the floor along which the cube slides = 158.6 J
Answer:
#include <iostream>
#include <cstring>
using namespace std;
void replacePeriod(char* phrase) {
int i = 0;
while(*(phrase + i) != '\0')
{
if(*(phrase + i) == '.')
*(phrase + i) = '!';
i++;
}
}
int main() {
const int STRING_SIZE = 50;
char sentence[STRING_SIZE];
strcpy(sentence, "Hello. I'm Miley. Nice to meet you.");
replacePeriod(sentence);
cout << "Updated sentence: " << endl;
cout << sentence << endl;
return 0;
}
Explanation:
- Create a function called replacePeriod that takes a pointer of type char as a parameter.
- Loop through the end of phrase, check if phrase has a period and then replace it with a sign of exclamation.
- Inside the main function, define the sentence and pass it as an argument to the replacePeriod function.
- Finally display the updated sentence.
Credit cards. You pay interest when you use them
Hi! I'm a Digital Marketer Intern at hotels.ng and I have a moderate knowledge on programming.
First, your question is not very explanatory. The term "view" is often used in back-end web development. A view is simply a Python function that takes a Web request and returns a Web response.
But I'm not sure this is what you want, so I'll just go ahead and write a python function involving class to return the total number of credits taken by a student.
I'll answer this question using Python.
class student(object):
credits = None
year = None
def num_credits(self):
#get credit value
self.credits = input("Enter the total number of credits: " )
pass
def getYear(self):
self.year = input("Enter current year: ")
pass
def tot_credits(self):
TotalCredits = tempTotalCredits + self.num_credits
print "Your total credits are :"+" "+str(TotalCredits)