subject

PYTHON QUESTION

Exercise 9.2.9: Strings To Integers 6 points

Make a function called safe_int that takes a single argument. This function

should try to convert the argument into an integer. If this succeeds, the

function should return that integer. Otherwise, the function should return 0.

Then, use this function in a list comprehension to create a list out of the

given list. The new list should contain either a O or the correct integer in

place of every string in the given list:

[0, 2, 7, 0]

Make sure to print out the resulting list.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
Answers: 1
question
Computers and Technology, 24.06.2019 07:40
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
Is a type of bullying that takes place when a person intentionally posts negative information about another person that is not true.
Answers: 2
You know the right answer?
PYTHON QUESTION

Exercise 9.2.9: Strings To Integers 6 points

Make a function...
Questions
question
Mathematics, 20.04.2021 02:00
question
Biology, 20.04.2021 02:00
question
English, 20.04.2021 02:00
question
Social Studies, 20.04.2021 02:00
Questions on the website: 13722362