subject

Write python expressions corresponding to these statements:

2.22 write an expression involving string s containing the last and first name of a person— separated by a blank space—that evaluates to the person’s initials. if the string contained my first and last name, the expression would evaluate to 'lp'.

2.23 the range of a list of numbers is the largest difference between any two numbers in the list. write a python expression that computes the range of a list of numbers lst. if the list lst is, say, [3, 7, -2, 12], the expression should evaluate to 14 (the difference between 12 and -2).

2.24 write the relevant python expression or statement, involving a list of numbers lst and using list operators and methods for these specifications:

(a) an expression that evaluates to the index of the middle element of lst

(b) an expression that evaluates to the middle element of lst

(c) a statement that sorts the list lst in descending order

(d) a statement that removes the first number of list lst and puts it at the end

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
Plz 40 points what are raster vectors? a bitmap image a vector file a type of printing press a small projector
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
question
Computers and Technology, 24.06.2019 23:50
What is your fav video game currently: a) roblox b) fortnite c) apex legends d) pubg
Answers: 2
You know the right answer?
Write python expressions corresponding to these statements:

2.22 write an expression i...
Questions
question
Mathematics, 04.12.2021 03:10
question
Mathematics, 04.12.2021 03:10
question
Mathematics, 04.12.2021 03:10
question
History, 04.12.2021 03:10