Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a function okay(p:str)->bool:

The p string must

1) contains at least one of lowercase(a-z )

2) minimum length=5

3) No character or digit can appear twice consecutively 

For example: 

okay('bVc3i') should return True

okay('Ad89vv') should return False 


write a function savenum(a:List[str])->Dict{str,int):
There will be some signs after string(++ means +1)( -- means -1)( -> means transfer to).
All values of the string at first = 0, we have to calculate the value of each string till the end, and return in Dictionary {name of string,value at the end}
For example : a=['Kim++', 'Jane--' , 'Mint--', 'Jane->Mint'] return {'Kim': 1, 'Mint: -2}
Explain example: Kim=1 Jane= -1 Mint= -1, and then -1 from Jane transfer to Mint( -1+(-1)= -2) Jane =0 so it doesn't return in Dict
Write a function good_string(p:str)->bool:
The p string must 1. contains one of lowercase(a-z) and one of uppercase(a-z)
2. contains one of digit(0-9) 4. min length=5 and max length=11 5. No character or digit can appear twice consecutively
For example:
good_string('bVc3@') should return True
good_string('Ad##9vv') should return False (# and v appear twice consecutively)
good_string('9$dkiOj@#45E') should return False (exceed max length)
Write a function good_string(p:str)->bool:
The p string must 1. contains one of lowercase(a-z) 2. contains one of uppercase(a-z)
3. contains one of digit(0-9) 4. min length=5 and max length=11 5) No character or digit can appear twice consecutively
For example:
good_string('bVc3@') should return True
good_string('Ad##9vv') should return False (# and v appear twice consecutively)
good_string('9$dkiOj@#45E') should return False (exceed max length)
If the customer has his/her personal bag which is not allowed
in the supermarket, his/her personal bag is kept at the
entrance of the supermarket and the system allocates him/her
an empty compartment number. This is the compartment
where the customer’s personal bag will be kept then he/she
proceeds to do his/her shopping.
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.

Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.

The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:

def new_line():

print('.')

def three_lines():

new_line()

new_line()

new_line()
Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop, along with the equivalent while loop and for loop. Finally, give an example of a for loop, along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure, and describe those advantages and disadvantages.
(loop)
• Row 0 contains 1 number—the number 1
• Each subsequent row is one longer than the one before and follows the pattern that you’ll discover.
The first five rows are
[[1],
[1, 2],
[2, 3, 5],
[5, 7, 10, 15],
[15, 20, 27, 37, 52]
]
Your task: Implement a function LoTri(n: int) -> List[List[int]]
Write a function for checking all alphabets in a word that are consisted in another word or not.
def reveal(first,second): that return boolean.
For example:
reveal(“Hokpolimio”, “Hpm”) = True #“H” ,”p”,”m” are in “Hokpolomio”
reveal(“Banana”,”Bka”) =False
Draw a flowchart to calculate the acceleration (m/s2) obtained from the motion of the cable. Apply appropriate control structure for tracing any invalid input that might occur in the program. Mass of should be higher than mass .
LATEST TUTORIALS
APPROVED BY CLIENTS