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
Type you all suck if you want to be my freind
Nina [5.8K]

Answer:

you all suck

Explanation:

;)

4 0
4 years ago
Read 2 more answers
Time-management techniques work most effectively when performed in which order?
Sholpan [36]

Answer:

study-time survey, project schedule, prioritize tasks, reward system.

Explanation:

Time management can be defined as a strategic process which typically involves organizing, planning and controlling the time spent on an activity, so as to effectively and efficiently enhance productivity. Thus, when time is properly managed, it avails us the opportunity to work smartly rather than tediously (hardly) and as such making it possible to achieve quite a lot within a short timeframe. Also, a good time management helps us to deal with work-related pressures and tight schedules through the process of properly allocating the right time to the right activity.

Hence, time-management techniques work most effectively when performed in the following sequential order; study-time survey, project schedule, prioritize tasks, and designing (creating) a reward system.

4 0
3 years ago
Which of the following is true about file formats?
MA_775_DIABLO [31]
It’s lil uzi Fer debí Moo cosmo I
234
Me
7 0
3 years ago
Read 2 more answers
Ryan is working on the layout of her web page. She needs to figure out where her header, navigation bar, text, and images should
galben [10]
4) Wireframing (89% sure)
6 0
3 years ago
Read 2 more answers
Secure email technique that provides confidentiality, along with authentication, integrity, and non-repudiation. It uses a centr
Llana [10]

Answer:

a

Explanation:

just put a

7 0
3 years ago
Other questions:
  • Trucking A. is one of the least flexible transportation modes. B. is increasingly using computers to manage its operations. C. i
    7·1 answer
  • Como hacer una pagina web
    15·1 answer
  • A type of indent where the first line of text starts at the left margin and the second and succeeding lines of text are indented
    7·2 answers
  • Piecewise functions are sometimes useful when the relationship between a dependent and an independent variable cannot be adequat
    12·1 answer
  • Calculate the performance of a processor taking into account stalls due to data cache and instruction cache misses. The data cac
    11·1 answer
  • Implement a sublinear running time complexity recursive function in Java public static long exponentiation (long x, int n) to ca
    14·1 answer
  • Explain the principles of computer applications ​
    11·1 answer
  • I need help plz it’s python
    6·1 answer
  • The return value is a one-dimensional array that contains two elements. These two elements indicate the rows and column indices
    12·1 answer
  • A program has a infinite while loop. How can you interrupt it?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!