Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started