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]
3 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]3 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
After Maya gave her friend the password to a protected website, the friend was able to remember it only long enough to type it i
EleoNora [17]

Answer:

The correct answer is Short Term Memory.

Explanation:

The A and D options, Procedural and Implicit memory are two of the long-term memory types and the question states that Maya forgot the password after typing it in, so these options are incorrect. Option C, Flashbulb Memory is a type of memory which stores specific moments and events in a person's lifetime which are remembered like snapshots. So the correct answer is B, Short Term Memory. I hope this answer helps.

5 0
3 years ago
The term ________ refers to fluid flow back to the pan to empty or drain a circuit.
Strike441 [17]

The term is: transmission flush

8 0
3 years ago
Why team goals should be broken into shon-term, medium-term, and long-term goals
lora16 [44]

Answer:

Explanation: Goals should be broken down according to time because it allows the team to decide what their overall purpose is, and to define the actions that will allow them to achieve their overall purpose.

7 0
3 years ago
Read 2 more answers
Write a program to read a list of exam scores given as integer percentages in the range 0-100. Display the total number of grade
Tju [1.3M]

Answer:

import java.util.Scanner;

public class Program

{

  public static void main(String [] Args)

  {

      int totalAGrades = 0, totalBGrades = 0, totalCGrades = 0, totalDGrades = 0, totalFGrades = 0, counter=0,maximum = 0, minimum = 9999, num, total = 0,smallest = 0,largest = 0;

       Scanner in = new Scanner(System.in);

       System.out.println("Enter exam percentage: ");

       System.out.println("Enter a negative examScore: ");

       int examScore = in.nextInt();

       while(examScore > 0)

       {

         counter++;

         if(examScore < 0){          

             break;}  

         else if(examScore > maximum){      

              maximum = examScore;}

         else if(examScore < minimum)   {  

              minimum = examScore;}

         

          total = total + examScore;  

     

          if(examScore <= 50 && examScore>0)

              smallest = examScore;

              if(examScore > 90 && examScore <=100)

              largest = examScore;

         

      if(examScore>=90 && examScore<=100)

          totalAGrades++;

      else if(examScore>=80 && examScore<=89)

          totalBGrades++;

      else if(examScore>=70 && examScore<=79)

          totalCGrades++;

      else if(examScore>=60 && examScore<=69)

          totalDGrades++;

      else if(examScore>=0 && examScore<=59)

          totalFGrades++;

      examScore = in.nextInt();

     

   }

      System.out.println("Total number of scores is = " + counter );

      System.out.println("Total Number of each Letter grade : " + counter);

      System.out.println("Percentage of total for each letter grade : ");

          System.out.println("Total number of A grades = "+ totalAGrades);

          System.out.println("Total number of B grades = "+ totalBGrades);

          System.out.println("Total number of C grades = "+ totalCGrades);

          System.out.println("Total number of D grades = "+ totalDGrades);

          System.out.println("Total number of F grades = "+ totalFGrades);

     

      System.out.println("Lowest exam Score is :"+smallest);

      System.out.println("Highest exam Score is :"+largest);

      System.out.println("Average exam Score = "+ (total / counter));

  }

}  

Explanation:

  • Get the exam information from user as input and run a while loop until examScore is greater than zero.
  • Use conditional statement to check the scores of students and increment the relevant grade accordingly.
  • Finally display all the information including grades and scores.
3 0
3 years ago
Which device makes telecommunications possible?
Dmitrij [34]
A. modem or d. voice input. Not a port because a port allows one to insert a peripheral device but not really communicate. I have no idea what an expansion slot is. It could be d. voice input because this allows a person to hold an audible conversation.

But  I'd go for modem because a modem lets you connect devices like laptops, tablets, phones, computers etc. and share data between them. So things like mailing are possible (I THINK)!  <span />
7 0
3 years ago
Other questions:
  • The Spinning Jenny reduced the number of workers necessary to _______. a.remove cotton seeds from fibers b.pump water from the m
    7·1 answer
  • In a linked chain implementation of a queue, the performance of the enqueue operation
    10·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
    10·1 answer
  • Assume that sentence is a variable that has been associated with a string consisting of words separated by single space characte
    5·1 answer
  • 1. Trust can be built in a relationship if:
    15·1 answer
  • Ania has written this SimpleStopwatch class. In which line is she measuring the elapsed time?
    13·1 answer
  • Why is it important to isolate evidence-containing devices from the internet?
    11·1 answer
  • What is the function of tab?<br>​
    15·1 answer
  • Which of the following was the first computer-animated film to win animated film to win an academy award?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!