Skip to content Skip to sidebar Skip to footer
Showing posts with the label Input

Why Python Does Not See All The Rows In A File?

I count number of rows (lines) in a file using Python in the following method: n = 0 for line in fi… Read more Why Python Does Not See All The Rows In A File?

How To Continuously Prompt For User Input?

I'm writing a function that prompts for input and then returns different results based on the i… Read more How To Continuously Prompt For User Input?

How To Record State Of Xbox/gamepad Controller In Python?

I need to know at a specific time the value of all buttons of an xbox controller. The reason being … Read more How To Record State Of Xbox/gamepad Controller In Python?

How To Use User Input To Select Row Column And Return Cell Value?

I have a pandas dataframe constructed from a csv file. I ask the user for two values, separated by… Read more How To Use User Input To Select Row Column And Return Cell Value?

Performing Infinite Loop While Awaiting Input

I have a little project I'm working on, it's fairly simple so I'm hoping someone can he… Read more Performing Infinite Loop While Awaiting Input

Python Writelines Skips First Line Of Raw_input

I am writing a simple journal program with python. I used sys.stdin.readlines() so the user could p… Read more Python Writelines Skips First Line Of Raw_input

Input A Multiline String In Python

I am trying to create a simple programme that inputs a single multiline input and outputs it as a t… Read more Input A Multiline String In Python

Python3 - Data Type Of Input()

I need to assign a user-provided integer value to an object. My format is as follows: object = … Read more Python3 - Data Type Of Input()

How To Take N Numbers As Input In Single Line In Python

Like in C++ how can I ask user input upto a range Below is the code to take user input in c++ #incl… Read more How To Take N Numbers As Input In Single Line In Python

Prevent Input() From Being Anything But Alphabet Characters

I am attempting to make a program for the sake of self-knowledge. I want to ask the user what their… Read more Prevent Input() From Being Anything But Alphabet Characters

Python User Must Only Enter Float Numbers

I am trying to find out how to make it so the user [only enters numbers Solution 1: I think you wa… Read more Python User Must Only Enter Float Numbers

Why Won't The While Loop Continue And Stop After A User Question?

questionnumber=0 color=('Red') userask=input('What color of the rainbow am I thinking o… Read more Why Won't The While Loop Continue And Stop After A User Question?

Selelnium - Python | Date Of Birth Fields By Using Label

I would like to create GENERIC python code which will fill in the day, month and year to the correc… Read more Selelnium - Python | Date Of Birth Fields By Using Label

Python Input() Takes Old Stdin Before Input() Is Called

Python3's input() seems to take old std input between two calls to input(). Is there a way to i… Read more Python Input() Takes Old Stdin Before Input() Is Called

How Do You Read Data In Csv File And Print Specific Ones?

in my program i ask the user for a number and then proceed to read a csv file using DictReader. I w… Read more How Do You Read Data In Csv File And Print Specific Ones?

How Do I Compare A String And An Integer In Python?

I am quite a newbie in Python. I wrote this and got this error when i typed a letter in the input: … Read more How Do I Compare A String And An Integer In Python?

Reading Input Files And Writing Into Output Files - Python

I have an input file (input.txt) with the following information: Number of students (first line) N… Read more Reading Input Files And Writing Into Output Files - Python

How To Print The Input As An Integer, Float Or String In Python

The purpose of my code is for the output to give the number and the type of the input. For instance… Read more How To Print The Input As An Integer, Float Or String In Python

Reading Tokens From A File In Python 3.x

Is there some way to read in information from a file by token regardless of the formatting? For ex… Read more Reading Tokens From A File In Python 3.x

Attributeerror: 'int' Object Has No Attribute 'replace'

I am wondering why I have this error when I run this code: # Ask user input # Find out network devi… Read more Attributeerror: 'int' Object Has No Attribute 'replace'