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
Aleksandr-060686 [28]
3 years ago
15

python3 Write a program with a function that accepts a string as an argument and returns a copy of the string with the first cha

racter of each sentence capitalized. For instance, if the argument is "hello. my name is Joe. what is your name?" the function should return the string "Hello. My name is Joe. What is your name?". The program should let the user enter a string and then pass it to the function. The modified string should be displayed.
Computers and Technology
1 answer:
Ksivusya [100]3 years ago
4 0

Answer:

MyString= input('Enter string: ')

string_capitalize(MyString)

print(MyString)

def string_capitalize(str):

        str= str.capitalize()

        return str

Explanation:

This python code is learnt to access string value from users and capitalize all characters in the beginning of each sentence.

You might be interested in
Match the following.
kolbaska11 [484]

d. Wind speed - Wind wane

6 0
3 years ago
Read 2 more answers
Write a string class. To avoid conflicts with other similarly named classes, we will call our version MyString. This object is d
kipiarov [429]

Answer:

Check the explanation

Explanation:

myString. h:

#include <iostream>

using namespace std;

#ifndef _MYSTRING_H_

#define _MYSTRING_H_

class myString{

private:

  char *str;

public:

  myString();

  myString(const char *s);

  void operator = (myString &s);

  int length();

  friend ostream &operator <<(ostream &out, myString &s);

  friend istream &operator >>(istream &out, myString &s);

  bool operator <(myString &s);

  bool operator <=(myString &s);

  bool operator >(myString &s);

  bool operator >=(myString &s);

  bool operator ==(myString &s);

  bool operator !=(myString &s);

};

#endif

myString. cpp:

#include "myString. h"

#include <cstring>

myString::myString(){

  str = new char;

  str[0] = '\0';

}

myString::myString(const char *s){

  int len = strlen(s);

  str = new char[len + 1];

  for(int i = 0; i < len; ++i){

      str[i] = s[i];

  }

  str[len] = '\0';

}

void myString::operator = (myString &s){

  s.str = new char[length() + 1];

  for(int i = 0; i < length(); ++i){

      s.str[i] = str[i];

  }

  s.str[length()] = '\0';

}

int myString::length(){

  return strlen(str);

}

ostream &operator <<(ostream &out, myString &s){

  out << s.str;

  return out;

}

istream &operator >>(istream &in, myString &s){

  in >> s.str;

  return in;

}

bool myString::operator < (myString &s){

  return strcmp(str, s.str) < 0;

}

bool myString::operator <= (myString &s){

  return strcmp(str, s.str) <= 0;

}

bool myString::operator > (myString &s){

  return strcmp(str, s.str) > 0;

}

bool myString::operator >= (myString &s){

  return strcmp(str, s.str) >= 0;

}

bool myString::operator == (myString &s){

  return strcmp(str, s.str) == 0;

}

bool myString::operator != (myString &s){

  return strcmp(str, s.str) != 0;

}

main. cpp:

#include "myString.h"

#include <iostream>

using namespace std;

int main(){

  myString s1, s2;

  cout << "Enter first string: ";

  cin >> s1;

  cout << "Enter second string: ";

  cin >> s2;

  cout << "you entered: " << s1 << " and " << s2 << endl;

  myString s3 = s1;

  cout << "Value of s3 is " << s3 << endl;

  if(s1 < s2){

      cout << s1 << " < " << s2 << endl;

  }

  if(s1 <= s2){

      cout << s1 << " <= " << s2 << endl;

  }

  if(s1 > s2){

      cout << s1 << " > " << s2 << endl;

  }

  if(s1 >= s2){

      cout << s1 << " >= " << s2 << endl;

  }

  if(s1 == s2){

      cout << s1 << " == " << s2 << endl;

  }

  if(s1 != s2){

      cout << s1 << " != " << s2 << endl;

  }

  return 0;

}

Kindly check the output below.

4 0
3 years ago
What page orientation has more room across the page?
AveGali [126]

Answer:

<h3>What is an advantage of landscape page orientation? Landscape lets you put more across the page.</h3>
7 0
3 years ago
What percentage of people ages 15 and over report using at least one social media platform?
yulyashka [42]

I believe the answer is d.

8 0
4 years ago
From the ITAdmin workstation, use the tracert command to identify the devices in the path between ITAdmin and a remote computer
yaroslaw [1]

An IP address is an application programming interface connected to a computer network. There are six routers in the path between IT admin and remote computer.

<h3>What is a router?</h3>

A router is a device that brings the internet service to your linked devices. It is used to forward the data packets on the network channel and also, maintain the traffic of the data on the server.

The default gateway is the IP of the local router that is not routed somewhere else but can be used to manage the router. The default gateway serves as the forwarding host.

Therefore, six routers are placed between the IT admin and the remote computer.

Learn more about IP address here:

brainly.com/question/20372171

#SPJ1

3 0
2 years ago
Read 2 more answers
Other questions:
  • What task did the u.s. government undertake that many people identify as the birth of the internet
    5·2 answers
  • WHAT DOES THE WORD MONOCHROME MEAN?
    11·1 answer
  • 7d2b:00a9:a0c4:0000:a772:00fd:a523:0358
    12·1 answer
  • The "Rudolph Rule" is best described by which of the following?
    9·1 answer
  • State and explain two default icons on the computer desktop​
    5·1 answer
  • Draw the resistor’s voltage and current phasors at t=15ms. Draw the vectors with their tails at the origin. The orientation of y
    5·2 answers
  • In Python please.
    13·1 answer
  • What is the purpose of using variables in programming?
    11·1 answer
  • 17. Ano ang tawag sa pahina ng Excel?
    12·1 answer
  • Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y =
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!