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
anzhelika [568]
2 years ago
7

The function below takes two arguments: a string (name) and an integer (position). Complete the function so that it prints out t

he a welcome statement that tells them person how many people are ahead of them in line. For example, your code should print out the following message if the person's name is Sally and their position is 24 (and hence have 23 people in front of them).
Welcome Sally! There are 23 people ahead of you in line.

student.py 1.
def print welcome (name, position):
# Implement your function here.
position - 1
print("Welcome Sally! There are (1) people ahead of you in line.".Format(name, position))
Computers and Technology
1 answer:
zhuklara [117]2 years ago
3 0

Answer:

The complete function is:

def printwelcome(name, position):

   position = position - 1

   print("Welcome {}! There are {} ahead of you in line".format(name,position))

Explanation:

This defines the function

def printwelcome(name, position):

This calculate the number of people in front

   position = position - 1

This prints the welcme message

   print("Welcome {}! There are {} ahead of you in line".format(name,position))

You might be interested in
Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
padilas [110]

Answer:

The java program for the scenario is given below.  

import java.util.*;

public class Test

{

// method returning sum of all digits in the integer parameter

static boolean anglePairs(int a1, int a2, int a3)

{

   // variable to hold sum of two complementary angles

   int comp=90;  

   // variable to hold sum of two supplementary angles

   int supp=180;

   // boolean variable to hold result

   boolean result = false;

   if( (a1+a2 == comp) || (a2+a3 == comp) || (a1+a3 == comp) )

   {

       if( (a1+a2 == supp) || (a2+a3 == supp) || (a1+a3 == supp) )

           result = true;

       else

           result = false;

   }    

           // return variable result

       return result;

}

public static void main(String[] args)

{

   // method is called by passing three positive angles

   System.out.println("The pair of angles have both complementary and supplementary angles " + anglePairs(100, 80, 90) );    

}

}

OUTPUT

The pair of angles have both complementary and supplementary angles false

Explanation:

The program works as described below.

1. The method, anglePairs(), is declared as static having return type as Boolean which takes three positive integer parameters.

static boolean anglePairs(int a1, int a2, int a3)

{

}

2. The integer variable, comp, is declared and initialized to 90.

3. The integer variable, supp, is declared and initialized to 180.

4. The Boolean variable, result, is declared and initialized to false.

5. Using if-else statements, sum of two angles are compared with the variables, comp and supp.

6. If the sum of any two angles match with both, comp and supp, variables, the Boolean variable, result is assigned value true. Otherwise, result is assigned value false.

7. The value of result is returned.

8. Inside main() method, the function anglePairs() is called and three positive numerical values are passed as parameters.  The output is displayed.

9. All the above code is written inside the class Test.

10. User input is not taken since it is not mentioned in the question.

8 0
3 years ago
Energy requirements of analog and digital signals.
jek_recluse [69]
Analog signals require more energy.

Analog=Constant flowing modulated

Digital is bursts of on/off binary data.
8 0
3 years ago
Read 2 more answers
What type of desktop system is Sarah using in the following scenario? Sarah types the phrase “Open Document 3” onto a black scre
Vedmedyk [2.9K]

I'd go with command-line interface.

A CLI enables users to type commands in a console or a terminal window expressed as a sequence of characters and presses the enter key on the keyboard to execute that command. And in this case, Sarah is typing an “open document 3” command to the command-line interface to open a file in her computer.

4 0
2 years ago
An arrangement in which local businesses team up with schools, hiring students to perform jobs that use knowledge and skills tau
Kazeer [188]

It is called a Cooperative program

A Cooperative program refers to a combination of both academic study and vocational activities in one curriculum of education. The purpose of this program is to provide the students with both knowledge in theory and practical skills that make them more prepared in the real world.


4 0
3 years ago
Read 2 more answers
What button is used for paragraph alignment on Microsoft 2016?
Margarita [4]
Just click the buttons on the Paragraph tab on Home.
6 0
3 years ago
Other questions:
  • You’ve been hired to help with installing cable at a new office building for the local branch of the Social Security Administrat
    14·1 answer
  • The _____ icon allows the user to improve the brightness, contrast, or sharpness of the picture.
    10·1 answer
  • If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
    7·2 answers
  • Create a new conditional format that applies yellow fill (fourth color under Standard Colors) and bold font to values that conta
    14·1 answer
  • When tcp/ip was developed, the host table concept was expanded into a hierarchical name system for matching computer names and n
    5·1 answer
  • The command to delete all the files that have filenames that starts with letter c or c and ends with a letter z or z is
    15·1 answer
  • Explain how each of the five types of prewriting assist a writer in getting started. please make it short.
    15·1 answer
  • How is actual cost calculated?<br><br> Please answer
    12·1 answer
  • Video is a medium that's looks real anyways, but is real________________.
    10·1 answer
  • Which of the following best explains what happens when a new device is connected to the Internet?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!