Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Python using lists: myList=[Hello,name,6,3.1,7.2,9.4,Good Bye,11.1,22] *Write a program that will total the numbers only. (In Python) Ex: to determine type of variable: for item

In Python using lists:

myList=["Hello","name",6,3.1,7.2,9.4,"Good Bye",11.1,22]

*Write a program that will total the numbers only. (In Python)

Ex: to determine type of variable:

for item in theList:

if (type(item) is int):

print ("The item is an integer: ", item)

elif(type(item) is str):

print ("The item is a string: ", item)

elif(type(item) is float):

print ("The item is a float: ", item)

else:

print ("Don't know the type of item")

This program has me utterly lost I appreciate any help I can get.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

Students also viewed these Databases questions

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

What are the different techniques used in decision making?

Answered: 1 week ago

Question

Define and measure service productivity.

Answered: 1 week ago