Hello all. I am new to programming, taking my first class in college. Im enjoying it a lot so far, and much of the info on daniweb has been a huge help. Due to some unforeseen circumstances, I had to miss class and am now having some troubles with a program.
We have to create a program that asks the user for a list of numbers separated by commas(if they are floats they are to be rounded). The program is then supposed to print out stars(*) based on each number in the list. Im having trouble getting the user input, converting it to an integer, and putting it into a list.
I have tried
numList=list(input("Enter a list of numbers: "))
to actually create a list with the input but Im not sure how to convert it into an integer afterward (keep getting an error) and separate everything properly.
Also gave this a shot, but same problems.
numList= numbs=input("Enter a list of numbers separated by commas: ") numList.append(numbs)
Any help would be appreciated. And I am using python 3.1.3. Thanks!
Edit: I should also probably mention that I can't even use anything to advanced as this is a beginner class. Havent even gotten into functions yet.