Noob
I am trying to write a script that gives a running balance. I am messing up on the elementary declared functions of python.
I need it too:
- accept a balance via input
- append ...
|
I need help with importing a file and converting each line into a list.
An example of the file would look like:
p wfgh 1111 11111 111111
287 48 0
65626 -1818 0
4654 21512 02020 ...
|
I know this is probably an easy question but after reviewing the documentation for python 2.6.4 I cannot seem to find out what is wrong. This is my file, in it's ... |
I would like to get user input to refer to some list in my code. I think it's called namespace? So, what would I have to do to this code for ... |
i want my python code to ask value of n,after user inputs the value.
program takes input for n values,and stores it in a list or something like array(in c).
input must be ... |
i need to test if the user input is the same as an element of a list, right now i'm doing this
cars = ("red","yellow","blue")
guess = str(input())
if guess == cars[1] or guess ...
|
Want to get data with some missing values from cvs into postgresql. I am happy to insert using strings. I would like a fast was to do this using list or ... |
|
I tried to use raw_input() to get a list of numbers, however with the code
numbers = raw_input()
print len(numbers)
the input [1,2,3] gives a result of 7, so I guess it interprets the ... |
I've been online for hours now, still cannot find a code that works! Any help is appreciated, thanks.
INPUT
>>> wordLst = ['bat', 'cat', 'bat', 'rat', 'bat', 'rat']
>>> listAnalyzer(wordLst)
OUTPUT
bat appears 3 times
bat ...
|
I've a lists containing .las Files of different length. I couldn't figure out how it is possible to create a variable containing all the list entries separated by a ";" ... |
I have csv input file, lets call it heights.csv. my example file has only four lines but it cannot be limited.
The first column contains just irrelevant name, the second one contains ... |
I have a bunch of lists in a module (say student_data) which I import in my file. All the list are of type student[1-100]. Now depending on user input I wish ... |
I would like to let the user define the name of a list to be used in the code, so I have been using an input function. I want the user's ... |
I know variations of this have been asked before, but I was unable to understand any of the previous implementations because most of them involved using sets and the issubset method.
Here ... |
Why can i only get the [-1.0,0.0,1.0,2.0,3.0], instead of
[0.0,1.0,2.0,3.0,4.0]
[-2.0,-1.0,0.0,1.0,2.0]
[-1.0,0.0,1.0,2.0,3.0], thank you
V = [1,2,3,4,5]
f = open('Qin.txt') # values in ...
|
Why don“t I get the following result, in this order?
[-2.0, -1.0, 0.0, 1.0, 2.0]
[-1.0, 0.0, 1.0, 2.0, 3.0]
[-2.0, -1.0, 0.0, 1.0, 2.0], instead i get the second list in the wrong ... |
ok, i'm a newbie so i appreciate any clues and hints. and this is my first question here, so sorry about anything messy! i have found alot of help with other ... |
Let's say that I have a line with: a = input("Enter your name and age:")
How can I make the variable "a" store each section of the input, lets say "George 25" ... |
I need to write a program that tells the user what further courses need to be taken in order to receive degree in CS. I created 3 lists for 3 different requirement fields (core, math, and stat). I asked the user to enter how many courses they have already taken. How do I prompt the user for each class taken and ... |
|
I'm trying to obtain multiple numbers from a user and then append those numbers to the list. I want to use a sentinel loop to exit once the user hits enter but am running into some problems. Can anyone see what I am doing wrong? Code: Select all def main(): List = createList() ... |
|
Hey guys I'm new to Python (and programming mostly) but I'm just trying to make a simple gradebook program that allows the users to enter in their own grades and get an average basically. I think I have most of the code right, except I can't figure out how to allow the users to make their own list so that I ... |
A few questions on inputs and listing. by Kaprekar Fri Dec 04, 2009 6:30 pm I'm sorry if the subject wasn't very well defined; I am not very knowledgeable on either python or its terms (hence the Beginners section). I have only been at this for about a day so my experience is limited. Also, answer at your own leisure. ... |
|
|
import time j = raw.input("How many different vowels does your conlang contain? ") print "Please input an ASCII character for every vowel you have in your conlang." i = 0 while i < j: # Get a new vowel (vow) from the user... # ...and append it to the list of vowels (vowli) ... |