Answer:
def scramble(s):
if len(s) % 2 == 1:
index = int(len(s)//2)
else:
index = int(len(s)/2)
return s[index:] + s[:index]
Explanation:
Create a function called scramble that takes one parameter, s
Check the length of the s using len function. If the length is odd, set the index as the floor of the length/2. Otherwise, set the index as length/2. Use index value to slice the s as two halves
Return the second half of the s and the second half of the s using slice notation (s[index:] represents the characters from half of the s to the end, s[:index] represents the characters from begining to the half of the s)
Answer:
I have the code written in c++ but the logic will be the same you just have to change the syntax ( if you're writing different language)
Explanation:
please mark brainliest
Explanation:
hardware are the physical parts of the computer which can be touched seen and felt is called hardware.
the device which are use to inter data and instructions from the user is clawed input device. foreg; keyboard , mouse.
the processing device of computer is cpu
the printed information which can be touched and seen is Called hardcopy .
soft copy are which can be seen but not touched is called soft copy .
the device that are use to store data and instructions is called storage devices.
Answer:
True.
Explanation:
A Central office or local office in Metropolitan cities is a building or an office where the phone lines coming from a home or office are terminated and connected to a bigger switching system.Central office got the switching equipment which holds the ability to switch calls long-distances or locally.Hence we conclude that the answer is True.
Using the knowledge in computational language in C code it is possible to write a customized chess code.
<h3>Writting the C code as:</h3>
<em>Wait PROTO</em>
<em>Write PROTO</em>
<em>CrLf PROTO</em>
<em>Delay PROTO</em>
<em>Clrscr PROTO</em>
<em> PROTO times:byte, color:dword</em>
<em>PROTO times:byte, color:dword</em>
<em>ROTO color:dword</em>
<em> PROTO color:dword</em>
<em>UpdateColor PROTO</em>
See more about C code at brainly.com/question/15301012
#SPJ1