input

Printing String after the user input on the same line

Printing String after the user input on the same line Question: so basically i want to use the python input() function to get a velocity input from the user. After the user types the number i want to display a nit like m/s behind the user input. I thought i can do something like this: …

Total answers: 2

Int's in input please help me

Reading ints in input in a Python program Question: I have to take input from the user then the operator has to print what number is before the input and after the input like: input= 3 has to print 2 and 4 I used range, did I do it wrong? I am just a beginner …

Total answers: 3

How do I take the average (mean) of inputted numbers in Python?

How do I take the average (mean) of inputted numbers in Python? Question: I would like to take create a code that takes an input of numbers, and then takes the average (mean) of these numbers. So far, I have this: from statistics import mean numbers=int(input("Enter some numbers. Seperate each number by a space: ") …

Total answers: 4

How do I limit inputs to only be Specific multiples in Python?

How do I limit inputs to only be Specific multiples in Python? Question: Currently doing a college assignment where we need to input and add 3 different scores. The Scores must be not be less than 0 or greater than 10, and they can only be in multiples of 0.5. It’s the latter part I’m …

Total answers: 2

Return normal terminal input when using tty, sys, terminos

Return normal terminal input when using tty, sys, terminos Question: I’m working on a little project which requiers input without "pausing" for each time. Without completely understanding how it works, I used some code that I found online. import tty, sys, termios while True: filedescriptors = termios.tcgetattr(sys.stdin) tty.setcbreak(sys.stdin) dir_inp = 0 while 1: dir_inp = …

Total answers: 1

'<=' not supported between instances of 'int' and 'method'

'<=' not supported between instances of 'int' and 'method' Question: >! How to fix this error? I wanted to make this application in such a way that when you enter into Text_Field = Entry (root, textvariable = txt), e.g. the number 20, a 20-character password is generat ‘<=’ not supported between instances of ‘int’ and …

Total answers: 2

Can't get string user input working (Python)

Can't get string user input working (Python) Question: I’ve searched the web and this site and been messing around all day, trying 100 ways to get this simple little program working. I’m practicing endless While loops and string user inputs. Can anyone explain what I’m doing wrong? Thank you! while True: print("This is the start.") …

Total answers: 2

sum up a numeric string (1111 = 1+1+1+1=4)

sum up a numeric string (1111 = 1+1+1+1=4) Question: #Develop a program that reads a four-digit integer from the user and displays the sum of the digits in the number. For example, if the user enters 3141 then your program should display 3+1+4+1=9. ri = input("please enter four digits") if len(ri) == 4 and ri.isnumeric() …

Total answers: 5

Too Much Wait TIme

Too Much Wait TIme Question: So I was trying to use a procedure(with a parameter)…I asked the user for inputs and created a validate function to check the inputs and see if they are strings…I checked it but the outputs are taking too long to output. How do I fix this? I tried: # Create …

Total answers: 1