Question

In [: Secret extra credit assignment Do this entirely on your own! You may emalL me/swing by office hours for assistance dGet

0 0
Add a comment Improve this question Transcribed image text
Answer #1

first function

def count_of_vowels(string):
count=0
vowels=["a","e","i","o","u","A","I","O","U","E"]
for ch in string:
if ch in vowels:
count+=1
return count

output

e Computer Science question! Chex 즐 Untitled C localhost:8888/notebooks/Untitledipynb?kernel-name-python3 : Apps e Types Of I

Circle function

def circle(diameter):
pi=3.1415
area=0
area=pi*(diameter/2)*(diameter/2)
return area

output

In [4]: def circle(diameter): pi-3.1415 area-0 area-pi (diameter/2) (diameter/2) return area In [5: printArea:.circle(10))

Case Switcher

code

def case_switcher(string):
output=""
for ch in string:
if(ch.isupper()):
output+=ch.lower()
elif(ch.islower()):
output+=ch.upper()
else:
output+=ch
return output

output

In [3]: def case suitcher(string) output- for ch in string if(ch.isupper)): elif(ch.islower()): else: output+-ch.lower() outp

list1_minus_list2

code

def list1_minus_list2(list1,list2):
output=[]
for item in list1:
if item not in list2:
output.append(item)
return output

output

hELLO WORD In [6]: def list1_minus_list2(1ist1,list2): output-[] for item in list1: if item not in list2: output, append (iteinteger_n(n)

code

def integer_n(n):
output=0
while (n < 999):
output+=n
n=n*10+n
return output

output

In [18]: def integer_n(n): output-8 while (n < 999); output+-n n-n 18+n return output In [19]: print(integer_n(5)) 665 In 1If you have any query regarding the code please ask me in the comment i am here for help you. Please do not direct thumbs down just ask if you have any query. And if you like my work then please appreciates with up vote. Thank You.

Add a comment
Know the answer?
Add Answer to:
In [: Secret extra credit assignment Do this entirely on your own! You may emalL me/swing...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT