Questions tagged [user-input]

User Input is data that the user inputs into the program. It generally takes the form of a String, but may also be an integer, floating-point number, etc.

5580 questions
1
vote
3 answers

How to find average, maximum, and minimum numbers of a list from user input in HTML

I'm trying to make a code that will evaluate numbers in a list from user input and will calculate the sum, average, minimum, and maximum of that list. I have already gotten the sum part from help from others. I can't seem to find how to get the…
Max Muchnick
  • 55
  • 4
  • 9
1
vote
0 answers

Options for user input of square roots, constants, imaginary numbers, and similar in python

I'm writing a program that, among other things, takes in user input for the entries of a matrix. These entries currently can be integers or floats - like value_list.append(float(input("what value for position _, _: "))) #value_list is then resized…
Auden Young
  • 1,147
  • 2
  • 18
  • 39
1
vote
2 answers

Making a user input create a row?

I'm trying to create a row in a matrix. For example, I want the user to enter the row length then for the program to create that row length in the matrix. I've been doing: int i, j; int[,] arr1 = new int[1, 1]; However, I don't know what to do for…
Samuel
  • 11
  • 2
1
vote
2 answers

Clone a table row and remove values in JavaScript

I have a set of text inputs fields which I want to be cloned when the user clicks the "add" button. My problem is that the fields are being cloned with the input from the user. Using Javascript, how do I reset the value of the text input fields so…
Pantone
  • 25
  • 1
  • 3
1
vote
1 answer

Get both a char and a integer as input OR just a char as input

Working on a C knapsack program that will have a UI like interface, I have come to a point where I need for the user to be able to enter in characters for commands and while all of the ones which require only a simple one character input are quite…
Bret Hasel
  • 303
  • 1
  • 11
1
vote
2 answers

Matlab table - Searching and isolating values in a table

I am trying to isolate data in a table based on user input. I have the below- sex=input("please input the gender (M/F): ", 's'); sysbp= input("enter styloic blood pressure: "); diabp= input("enter dystolic blood pressure:…
1
vote
1 answer

how to change an input type="file" name in JavaScript

I am having an issue with changing a file name. The main issue I am having is when the user takes a picture from an iPhone. iOS names all just captured photos image.jpg. I am trying to give the user a chance to change the file name or do something…
Ben-Coden
  • 126
  • 1
  • 14
1
vote
1 answer

Save new user inputs and modification to a local file in a persistent way

I am working with the DTedit package and would like to implement two functionalities. I am attaching the code sample from the package author's github. The two things that I would like to implement are: a button that saves the data after any new…
Jdv
  • 329
  • 1
  • 10
1
vote
2 answers

continuing program after entering integer user input c#

when i run my code, my console suddenly shuts off after a number is entered into the console. int age; Console.WriteLine("How old are you?"); age = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("You are {0} years…
Emily
  • 11
  • 1
1
vote
1 answer

How to check if the user enters something in the console? Javascript

How could one check if the user enters something in the console? I want a function to run whenever a user enters something in the console, say function whenUserTypesInConsole() { alert('you entered something in the console'); } and if that can…
jkrei0
  • 188
  • 1
  • 9
1
vote
1 answer

Turtle-graphics not responding to onkey() commands if a while loop is active

I'm trying to make a game where the turtle needs to be able register and respond to user inputs (Simplified, a letter will appear and the user needs to click it on the keyboard. So if it shows "b" the user types "b"). I only added the letters a to f…
Alex
  • 27
  • 7
1
vote
1 answer

How to add user input vue&axios api call?

I am trying to add a user input for a query to add to my application, which utilizes a News API. Working with Vue and Axios. It works with default links, however, implementing a user input for 'query' it doesn't work. So simply I I am trying to add…
Asim
  • 31
  • 4
1
vote
5 answers

How to print specific parts of a list using user input in Python

I been searching but nothing quite answers what I'm looking for. For this assignment we were given a list, but I need to print out specific elements from that list so it could look something like this, but I need to use user input to search that…
1
vote
4 answers

How do I check if user input is an integer in Ruby?

I am trying to loop until user inputs an integer. When user inputs a letter, the following code should print "Think of a number": print "Think of a number " while user_input = gets.to_i if user_input.is_a? Integer puts "your number is…
Taj
  • 107
  • 9
1
vote
1 answer

Assign a integer value to character

what is the best method to take a user input of a character and convert this to a specific number? Then store this number to an array. I have a bit of code that I have re-written multiple times and so far have not been able to get it to…
John Lucey
  • 11
  • 2