Computer Science, asked by pooch8831, 10 months ago

Tion: 1/ what does each of the following expression evaluate to ? suppose that l is the list l=["these", "are", "a", ["few", "word"], "that", "we", "will" , "use"] a. l[3:4][0][1] b. l[3:4][0][1][2]

Answers

Answered by poojan
1

Outputs:

1. 'word'

2.'r'

Given list:

l=["these", "are", "a", ["few", "word"],  "that", "we", "will" , "use"]

To find:

The outputs for the statements

  • l[3:4][0][1]
  • l[3:4][0][1][2]

Evaluation:

For l[3:4][0][1]

The evaluation starts from left to right.

So, from l[3:4][0][1], the evaluation goes as:

l[3:4] -> [["few", "word"],]   #values from indices 3 to 4 from the list and 4 is exclusive.Note that, sub-list is considered as one element.

l[3:4][0] -> ["few", "word"]  #takes the 0th index element, i.e, sublist from l[3:4]

l[3:4][0][1] -> "word"   #Gives the element at index 0 of the list l[3:4][0]

Therefore, l[3:4][0][1] results the output 'word'

For l[3:4][0][1][2]

From the previous bit, we have already got the value of l[3:4][0][1] as 'word'

l[3:4][0][1] as 'word'

Then, l[3:4][0][1][2] is the letter at index 2 in the word 'word' which is 'r'

Therefore, l[3:4][0][1][2] results the output 'r'

Learn more:

1. Tools > ________ deals with equations with multiple unknown variables.

brainly.in/question/20886057

2. True or false: to join two strings,use the dollar ($) character.

brainly.in/question/21624446

Answered by Anonymous
0

Explanation:

QUESTION:

What is the mass number of an atom with 6 protons and 8 neutrons?

Answer:

\huge{ \boxed{ \bold{ \sf{14 \: amu}}}}

Explanation:

✑ First, Let's explore about ATOMIC MASS :

↱ An atom consists of electrons , protons and neutrons. The mass of electron is extremely small and it is taken as a negligible mass compared to the mass of a proton or neutron. Thus , The atomic mass is defined as the sum of the number of protons and neutrons present in the nucleus of an atom of that element. If is also called atomic weight. It is denoted by A. The nucleus determines the mass of an atom, while the number of electrons determines the size of the atom of the element.

Mathematically,

Atomic mass = Number of protons + Number of neutrons

i.e \boxed{ \sf{A = p^{ + } + n^{0}}}

———————————————————————

✎ Now , Let's find the atomic mass of atom having 6 protons and 8 neutrons :

☞ Atomic mass = No. of protons + No. of neutrons

➵ Atomic mass = 6 + 8

➵ Atomic mass = \boxed{ \sf{14 \: amu}}

And we're done !

Hope I helped!

Have a wonderful day! ツ

▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁

Similar questions