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
MA_775_DIABLO [31]
3 years ago
9

The PadRight function has two parameters: S (a string) and N (an int), and returns as its result the string S padded on the righ

t with blanks until the length of S contains no fewer than N characters. The PadLeft function is identical to PadRight except that it adds blanks to the left side of the string. For example, the string "Frog" is four characters long, so PadLeft("Frog",7) would return the
Computers and Technology
1 answer:
oee [108]3 years ago
6 0

Answer:

The following code is written in python programming language:

def PadRight(S,N):   #define user defined function

 if(len(S)<N):    # set if condition

   S=S.ljust(N)   #set the space to right

   return S       # return the result

 

def PadLeft(S,N):    #define user defined function

 if(len(S)<N):    # set if condition

   S=S.rjust(N)   # set the space to left

   return S       # return the result

'''calling the function'''

print(PadLeft("Frog",7))

print(PadRight("Frog",7))

Output:

      Frog

Frog

Explanation:

Here, we define a user defined function "PadRight()" and pass two arguments in its parameter "S", "N".

Then, set the if condition and pass condition "len(S)<N" then, if the condition is true then the code inside the if condition set the space to right then, return the output.

After that, we again define a user defined function "PadLeft()" and pass two arguments in its parameter "S", "N".

Then, set the if condition and pass condition "len(S)<N" then, if the condition is true then the code inside the if condition set the space to right then, return the output.

You might be interested in
Explain any two computer technologies that has improved e commerce
Elena-2011 [213]
1- AI and chatbots for customer communications -

Artificial Intelligence plays an important role in everyday life, having a major impact on how we live and work. There are several examples of AI and automation tools with customer service applications for your business, including voice-powered assistants such as Apple’s Siri, Google’s home and Amazon Echo. Research shows that 45% of millennials are already using this type of voice activated search for online shopping.

Chatbots and virtual assistants represent the future for businesses. Some are already integrating chatbots in their systems to improve their customers’ experience and boost brand image.

With the help of Chatbots you can order food, check in luggage at the airport, book a hotel room, schedule your flight, and get recommendations for almost anything you can think of. The Starbucks chatbot for example gives customers details regarding their order status, payment details etc.

2- Image search-

Ecommerce businesses are integrating image search technology on their websites so customers can easily photograph products they are interested in and find similar examples on other sites that may be offering better deals.

Imagine someone sees a beautiful couch, but it costs too much for them. If your business offers similar products at a more reasonable price, integrating image search into your website will allow you to potentially pick up on this sale, creating an extra revenue stream.
6 0
3 years ago
What device is used to transmit what is effectively a type of Morse code between stations?
IrinaVladis [17]
<h3>Its B 100% sure.....</h3>

Brainiest Please :)

6 0
3 years ago
A software program installed without the user's knowledge and designed to alter the way a computer operates or to cause harm to
RSB [31]

Answer:

The correct answer for the given question is "Computer virus"

Explanation:

A computer virus is a software program that is installed automatically without user's knowledge and designed to duplicate itself .The main purpose of computer virus is to harm the computer system.

Some of the points regarding computer virus

1.The computer virus contain malicious software Which harm the computer system.

2.It damage the  computer computer system in such away that sometimes users will unable to access some certain functionality of computer system.

5 0
3 years ago
I want to do is speed test to do i go to for my computer
laiz [17]

I just go to the speed test on my browser

7 0
3 years ago
Technically a coding question utilizing python how would one calculate a square root
WITCHER [35]

Answer:

import math

math.sqrt( x )

Explanation:

The basic code that can be written to calculate the square root of a number is as follows

import math

math.sqrt( x )

5 0
3 years ago
Other questions:
  • What output will the look up formula below produce in relation to the following table?
    11·1 answer
  • Briefly discuss constraints
    13·1 answer
  • Tristan has successfully deleted the blank row. The next thing he wants to do is to increase the length of the first column. A 2
    13·2 answers
  • The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry.
    7·1 answer
  • You work on a team whose job is to understand the most sought after toys for the holiday season. A teammate of yours has built a
    11·1 answer
  • Give four examples of devices which are both<br>Input and Output to a Computer.​
    12·1 answer
  • Cutting of trees is bad or not bad​
    6·2 answers
  • ¿ cuales son las características de revolución industrial?
    11·1 answer
  • Where are super computer mainly used​
    13·2 answers
  • Which of these are the two main components of a CPU?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!