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
PIT_PIT [208]
3 years ago
14

Write a method that accepts a string as an argument and checks it for proper capitalization and punctuation. The method should d

etermine if the string begins with an uppercase letter and ends with a punctuation mark. The method should return true if the string meets the criteria; otherwise it should return false .
Computers and Technology
1 answer:
Contact [7]3 years ago
6 0

Answer:

The method in Python is as follows:

def checkStr(strng):

   if strng[0].isupper() and strng[-1] == "?":

       return True

   else:

       return False

Explanation:

This defines the method

def checkStr(strng):

This checks if the first character i upper and if the last is "??

   if strng[0].isupper() and strng[-1] == "?":

If the condition is true, the function returns true

       return True

Else, it returns false

<em>    else:</em>

<em>        return False</em>

You might be interested in
My name Jeff <br><br> what movie is this off of
Zielflug [23.3K]

Answer:

there is no movie name off of

4 0
3 years ago
Read 2 more answers
What are the three main elements common to all radio ads?
Mama L [17]
Answer: final notions on frequency, reach, and consistency.



If my answers wrong please tell me :D
5 0
3 years ago
Read 2 more answers
What is an XML-based open standard for exchanging authentication and authorization information and is commonly used for web appl
nalin [4]

Answer:

SAML.

Explanation:

SAML seems to be an accessible standardized XML-based for some of the sharing of validation and verification details and has been generally implemented for the web apps and it seems to be a design that would be SSO. Verification data is shared via XML documentation which are securely signed. So, the following answer is correct according to the given scenario.

4 0
3 years ago
Consider the classes below, declared in the same file: class A { int a; public A() { ​ a = 7; } } class B extends A { int b; pub
DiKsa [7]

Answer:

2. <em>A reference of type A can be treated as a reference of type B</em> - False

Base class or its objects are not related to their derived class (or its objects).

Explanation:

class A {

   int a;

   public A() {

       a = 7;

   }

}

class B extends A {

   int b;

   public B() {

       b = 8;

   }

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

1. <em>After the constructor for class B executes, the variable a will have the value 7 </em>- True.

When an object of a derived class is declared, the constructor of base class is called before the constructor of derived class (is called).

3. <em>Both variables a and b are instance variables </em>- True.

Classes can have instance, or member, variables and methods.

4.<em> After the constructor for class B executes, the variable b will have the value 8</em> - True.

When object of class B is declared, its constructor was called, which initialized variable b to 8.

4 0
4 years ago
What: A challenging question on this module's material.
Alekssandra [29.7K]

Need further information!!!

6 0
3 years ago
Other questions:
  • Write a program that inputs a line of text and uses a stack object to print the line reversed.
    14·1 answer
  • Create a function average_temp(s) that accepts a file name s that contains temperature readings. Each line in the file contains
    15·1 answer
  • What is the recommended size for bulleted text?
    5·2 answers
  • After placing her insertion point after Grandma’s Kitchen, order the steps Danica needs to follow to insert and format the regis
    8·2 answers
  • Solve the following quadratic equation <br><br>y=6x^2-12x+1
    9·1 answer
  • Solve the recurrence relation.<br> S(1)=1<br> S(n)= S(n-1)+(2n-1) for n&gt;=2
    13·1 answer
  • (PYTHON HOMEWORK)Given the following code snippet, which statement tests to see if all three sets are equal?:
    11·1 answer
  • What kind of app or technology would you like to create?  Why ? <br><br><br>​
    11·1 answer
  • Can you install Ubuntu on a hard drive by porting from the folder to the HDD?
    10·1 answer
  • Select the correct answer.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!