answer.
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]
2 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]2 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
Early Intel processors (e.g., the 8086) did not provide hardware support for dual-mode operation (i.e., support for a separate u
Firlakuza [10]

Answer:

Uneven use of resources

Explanation:

Potential problem associated with supporting multi - user operation without hardware support is:

Uneven use of resources: In a situation where we assign a set of resources to user 1 and if a new user comes, then it would be difficult to allocate new resources to him. The processor would get confused between the two users. And the tasks would not be completed. This can affect task processing.

8 0
1 year ago
If there are three classes, Shape, Circle and Square, what is the most likely relationship among them?
xz_007 [3.2K]

Answer: B) Shape is a base class, and circle and square are derived classes of Shape.

Explanation:

Shape is a base class because circle and squares are the shapes so these are the derived class of the shape, which is inherited by the shape like circle and square. As, the base class (shape) is the class which are derived from the other classes like circle and square and it facilitates other class which can simplified the code re-usability that is inherited from the base class. Base class is also known as parent class and the super class.  

8 0
2 years ago
The base class Pet has private fields petName, and petAge. The derived class Dog extends the Pet class and includes a private fi
Lapatulllka [165]

Answer:

Hello attached is the Java program written to solve the problem

The Pet.java and Dog.java files are unaltered

Explanation:

The input and output  codes are attached as well i.e the second image is the input while the third image is the output code

5 0
1 year ago
Stan’s assignment is to print a three-dimensional image on a piece of paper. Which printing technique should he use?
Zigmanuir [339]

Answer:

to print a three-dimensional image on a piece of paper he should use autocad

8 0
1 year ago
Read 2 more answers
Mark and John are developing a program using Python. They name a variable 24_hour_mart, but then recognize that this name violat
77julia77 [94]

Answer:

Option 2: Variable names can not begin with a number.

Explanation:

As given Mark and John named a variable as 24_hour_mart while writing a program in python.

While it is forbidden to name a variable starting with any digit, only alphabets (capital and smaller) and underscore can be the first letter of the variable name.

Moreover, by considering the other options given:

  • Variable name can include the underscore (_) between the words. It is used instead of spaces that are not allowed.
  • There is no upper limit for variable length, it can be of any reasonable length and more than 10 characters say 11 or 12 are reasonable.
  • There is no lower limit for variable length, it can be any reasonable length , even it can be of 1 character.

Variables named in python language must not be the keywords as they are reserved for other purposes.

i hope it will help you!

3 0
2 years ago
Other questions:
  • Which port, along with a special card and cables, supports the connection of microcomputers, modems, and printers in a local are
    6·1 answer
  • Annabeth has been using a public cloud to store and access her documents. Which drawback of a public cloud should she be aware o
    11·1 answer
  • Write a copy constructor for carcounter that assigns origcarcounter.carcount to the constructed object's carcount. sample output
    15·2 answers
  • What kind of device can monitor a connection at the demarc but cannot interpret data?
    9·1 answer
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
    8·1 answer
  • The web development team is having difficulty connecting by ssh to your local web server, and you notice the proper rule is miss
    8·1 answer
  • Consider a set A = {a1, . . . , an} and a collection B1, B2, . . . , Bm of subsets of A (i.e., Bi ⊆ A for each i). We say that a
    12·1 answer
  • A machine is having issues, so the user is responsible for getting the machine serviced. Which stage of the hardware lifecycle d
    13·1 answer
  • A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!