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
stealth61 [152]
3 years ago
15

Define a named tuple Player that describes an athlete on a sports team. Include the fields name, number, position, and team.

Engineering
1 answer:
Soloha48 [4]3 years ago
7 0

Answer:

Explanation:

we would be analyzing this question with the important code given

#code :

from collections import namedtuple

#creating a named tuple named 'Player' with field names name, number, position and team

Player = namedtuple('Player',['name','number','position', 'team'])

cam = Player('Cam Newton','1','Quarterback','Carolina Panthers')

lebron = Player('Lebron James','23','Small forward','Los Angeles Lakers')

print(cam.name+'(#'+cam.number+')'+' is a '+cam.position+' for the '+cam.team+'.')

print(lebron.name+'(#'+lebron.number+')'+' is a '+lebron.position+' for the '+lebron.team+'.')

NB:

Lebron James (#23) rep. Small forward for the LA lakers

Cam Newton(#1) rep. a Quaterback for the Carolina Panthers

cheers i hope this helps

You might be interested in
The food and drug administration exists to protect the public against …
stiks02 [169]

Answer:

The Food and Drug Administration is responsible for protecting the public  by ensuring the safety of our nation's food supply, cosmetics, and products that emit radiation

Explanation:

6 0
2 years ago
He is going ___ in the hot air ballon​
Vladimir [108]

no artical shoul be used here

5 0
3 years ago
The following figures were obtained in a standard tensile test on a specimen of low carbon steel with a circular sectional area:
liq [111]

Answer:

See Explaination

Explanation:

1)here for given stress strain curve graph is given as follows

where for getting stress,S=F/A=4F/(pi*(50*10^-3)^2)

for strain=e=dl/l=dl*10^-3/100 mm/mm or m/m

2)so graph is as follows

3)for getting youngs modulus of elasticity we must know slope of graph stress verses strain and for straight line in elastic region upto 12 point we have elastic region and from that we get E as

E=slope of graph for first 12 points=S/e=14.5665*10^9/.812=17.9390*10^9 N/m2

4)for getting ultimate tensile stress at which specimen bears maximum load without failure so we get UTS as

UTS=maximum load/area=40*10^6/1.9634=20.3728*10^6 N/m2

5)percentage reduction in area is given by

percentage reduction in area=[original area-final area/original area]*100

Percent reduction=[5062-10^2]*100/50^2=96%

6)percentage elongation is given by

percent elongation=[final length-original length/original length]*100

final length at fractureis=14.56+100=114.56 mm

so we get percent elongation as=[114.56-100/100]*100=14.56%

7)true fracture stress is given by load at fracture devided by true area at fracture

Sf=load/(true area)=4*28*10^3/(pi*(10*10^-3)^2)=356.5070*10^6 N/m2

8 0
4 years ago
Copy the file DiceSimulation.java (see Code Listing 4.1) from below these instructions. DiceSimulation.java is incomplete. Since
Aliun [14]

Answer:

Program Dice.java

=================================================

import java.util.Random;

public class Dice

{

private int spots; //the number of spots up on the die

private static Random generator;

//a random number generator use simulating rolling dice,

//shared by all dice, so that it will be as random as possible

//constructor creates a single die, inititally with no spots

public Dice()

{

//create an instance of the random

generator = new Random();

spots = 0;

}

//simulates rolling the die and stores the numbers rolled

public void roll()

{

//return 1,2,3,4,5, or 6

spots = generator.nextInt(6) + 1;

}

//return the value of the die

public int getSpots()

{

return spots;

}

}

=========================================================

Program DiceSimulation.java

=========================================================

public class DiceSimulation

{

public static void main(String [] args)

{

final int NUMBER = 10000; //the number of times the roll the dice

Dice die1 = new Dice(); //first die

Dice die2 = new Dice(); //second die

int die1Value; //the number of spots on the second die

int die2Value; //the number of spots on the first die

int count = 0; //number of times the dice were rolled

int snakeEye = 0; //number of times of snakes eyes is rolled

//number of times double two's, three's, four's, five's, six's

int twos = 0;

int threes = 0;

int fours = 0;

int fives = 0;

int sixes = 0;

//ENTER YOUR CODE FOR THE ALGORITHM HERE

for(count=0;count<=NUMBER;count++)

{

die1.roll();

int t1=die1.getSpots();

die2.roll();

int t2=die2.getSpots();

if(t1==t2)

{

if(t1==1)snakeEye++;

else if(t1==2)twos++;

else if(t1==3)threes++;

else if(t1==4)fours++;

else if(t1==5)fives++;

else if(t1==6)sixes++;

}

}

count--;

//output to console

System.out.println("You rolled snake eyes " + snakeEye

+ " out of " + count + " rolls.");

System.out.println("You rolled double two " + twos

+ " out of " + count + " rolls.");

System.out.println("You rolled double threes " + threes

+ " out of " + count + " rolls.");

System.out.println("You rolled double fours " + fours

+ " out of " + count + " rolls.");

System.out.println("You rolled double fives " + fives

+ " out of " + count + " rolls.");

System.out.println("You rolled double sixes " + sixes

+ " out of " + count + " rolls.");

}

}

========================================================

Sample output:

5 0
3 years ago
wo companies, Ajax Co. and Boho Inc., were negotiating a merger. In the course of the negotiations, an Ajax representative told
boyakko [2]

Answer:

Yes

Explanation:

If the Ajax representative fails to correct the previous statement this can cause misrepresentation.

4 0
3 years ago
Other questions:
  • The moisture in hot, humid, stagnant air surrounding a cold-water pipeline continually diffuses to the cold surface where it con
    14·1 answer
  • The weight of a liter of oil that has a specific gravity 0.83 is a) 3.0 N b) 8.1 N c)0.18N d) 18.0 N e) None of these
    7·1 answer
  • A satellite orbits the Earth every 2 hours at an average distance from the Earth's centre of 8000km. (i) What is the average ang
    7·1 answer
  • If a hoist lifts a 4500lb load 30ft in 15s, the power delivered to the load is a) 18.00hp b) 9000hp c) 16.36hp d) None of the ab
    8·1 answer
  • Two metallic terminals protrude from a device. The terminal on the left is the positive reference for a voltage called vx (the o
    8·1 answer
  • Given a two-dimensional steady inviscid air flow field with no body forces described by the velocity field given below. Assuming
    8·1 answer
  • A(n) ____ is an object setting used to control the visible display of objects.
    15·1 answer
  • Manufacturers frequently make choices about their suppliers of raw materials based on their impact on society and the environmen
    5·1 answer
  • Future solution for air pollution in new zealand
    7·1 answer
  • Concerning the storage battery, what category of the primary sources is voltage produced?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!