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
Ierofanga [76]
4 years ago
10

Let's revisit our lucky_number function. We want to change it, so that instead of printing the message, it returns the message.

This way, the calling line can print the message, or do something else with it if needed. Fill in the blanks to complete the code to make it work.
def lucky_number(name):
number = len(name) * 9
___ = "Hello " + name + ". Your lucky number is " + str(number)
___

print(lucky_number("Kay"))
print(lucky_number("Cameron"))
Computers and Technology
1 answer:
maksim [4K]4 years ago
3 0

Answer:

Replace the first blank with:

message = "Hello " + name + ". Your lucky number is " + str(number)

Replace the second blank with:

return message

Explanation:

The first blank needs to be filled with a variable; we can make use of any variable name as long as it follows the variable naming convention.

Having said that, I decided to make use of variable name "message", without the quotes

The next blank is meant to return the variable on the previous line;

Since the variable that was used is message, the next blank will be "return message", without the quotes

You might be interested in
How to set up a paper format in any type of Microsoft version ????
Mashcka [7]
Explain further what you mean by that.
7 0
4 years ago
The copy constructor for a class is called____________.
White raven [17]

Answer:

b.) when an object of the class is initialized by another object of the class

Explanation:

the copy constructor for a class is called <u>when an object of the class is initialized by another object of the class</u>

4 0
4 years ago
What is a mechanical gear and how does it work to create more power?
Neko [114]
Its a gear that is not turned manually and it can spin faster and longer than a manual gear.
5 0
3 years ago
What is the role of a control in a system that is functioning correctly
iren2701 [21]
A control system manages, commands, directs, or regulates the behavior of other devices or systems using control loops. It can range from a single home heating controller using a thermostat controlling a domestic boiler to large industrial control systems which are used for controlling processes or machines.
4 0
3 years ago
Russian newspaper says U.S. journalism is conducting 'experiments' to introduce fast-growing artificial intelligence technology.
Marina86 [1]

Answer:

Russian newspaper says U.S. journalism is conducting 'experiments' to introduce fast-growing artificial intelligence technology.

Explanation:

Artificial intelligence (AI) is a wide-ranging tool that enables people to rethink how we integrate information, analyze data, and use the resulting insights to improve decision making—and already it is transforming every walk of life. In this report, Darrell West and John Allen discuss AI's application across a variety of sectors, address issues in its development, and offer recommendations for getting the most out of AI while still protecting important human values.

4 0
3 years ago
Read 2 more answers
Other questions:
  • What does nntp stand for?
    12·2 answers
  • A certain computer can be equipped with 268,435,456 bytes of memory. Why would a manufacturer choose such a peculiar number inst
    12·1 answer
  • Which device in a wireless local area network determines the next network to which a packet should be forwarded??
    5·1 answer
  • Write four overloaded methods called randomize. Each method will return a random number based on the parameters that it receives
    5·2 answers
  • Llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    7·1 answer
  • Study the sentences below. A.Changing the properties of characters in a sentence or paragraph in a Word document helps increase
    5·2 answers
  • Construct pseudocode for a program that prints ‘Hello World’ on the screen.
    7·2 answers
  • What are the top 10 most dangerous computer viruses ?
    13·1 answer
  • Explain the importance of the educational apps.give an example to support your answer ​
    6·1 answer
  • You're on the lead generation team at a wine reseller called Partners in Wine. You've noticed that the user open rate of your em
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!