Question

Book name is Starting Out with Programming Logic and Design (5th Edition) Chapter 6: Functions Algorithm...

Book name is Starting Out with Programming Logic and Design (5th Edition)

Chapter 6: Functions

Algorithm Workbench

1. Design a simple function named timesDozen that accepts an Integer argument into a parameter named nbr. When the function is called, it should return the value of its argument multiplied times 12.

2. Assume that a program has two String variables named alpha and bravo. Write - a pseudocode statement that assigns an all uppercase version of alpha to the bravo variable.

Homework Answers

Answer #1

I have created function in python.

1.


#takes integer argument nbr
def timesDozen(nbr):
    
    #multiply nbr with 12
    ans = nbr * 12 
    
    #return ans
    return ans

#prints the value returned by timesDozen function
print("Answer: ", timesDozen(5))

2.

alpha = "hello"

#upper method convert the string alpha into upper case
bravo = alpha.upper()

print(bravo)

Know the answer?
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
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT