user-input

Python Mechanize Error +

故事扮演 提交于 2019-12-02 04:32:28
I am new to python (done some java in the past). I recently decided to automate a process that takes me about 20 hours once a year. I need to login to a vendor's website, with a login form they have. That then loads a new form which I can select an order from, and then it loads yet another form I can submit an item number to. This then loads the page with sizes of the item and price per size, I take this information and put it into a spreadsheet. The row has columns based on number of sizes and then price (item,sm,med,lg,9.99,10.99,12.99). After that return to the browser, i hit the back

Java Scanner input with if else statement

不想你离开。 提交于 2019-12-02 04:31:31
问题 Hi I'm new to java and trying to make a Quiz to practice. I wanna make a Question where the user has to combine words from to categories to pairs. Like A1 B4 C3 D2. What I did now is using an if else statement to check if the input is the correct answer, but it only works with 1A. For the others I can do 6 inputs, which is not what I want, and even if there's a correct one I don't get a point. public class HelloWorld { public static void main(String[] args) { Scanner walther = new Scanner

C++ CIN cin skips randomly

假如想象 提交于 2019-12-02 04:30:32
问题 I have this program, but cin in randomly skips.. I mean sometimes it does, and sometimes it doesn't. Any ideas how to fix this? int main(){ /** get course name, number of students, and assignment name **/ string course_name; int numb_students; string assignment_name; Assignment* assignment; cout << "Enter the name of the course" << endl; cin >> course_name; cout << "Enter the number of students" << endl; cin >> numb_students; cout << "Enter the name of the assignment" << endl; cin >>

user input value to use as decimal value python

霸气de小男生 提交于 2019-12-02 03:03:32
I am writing a python code where I ask the user for input and then I have to use their input to give the number of decimal places for the answer to an expression. userDecimals = raw_input (" Enter the number of decimal places you would like in the final answer: ") then I convert this to integer value userDecimals = int(userDecimals) then I write the expression, and I want the answer to have as many decimal places as the user input from UserDecimals, and I don't know how to accomplish this. The expression is math.sqrt(1 - xx **2) If this isn't clear enough I will try to explain it better, but I

Buttons to be renamed by the user

允我心安 提交于 2019-12-02 02:50:35
I am having problems coding some of my buttons. This is what I've got so far: Public Class Form1 Dim Button(12) As Button Dim X As Integer Private Sub EventName() Dim message, title, defaultValue As String Dim myValue As Object If Label4.Text = "Admin" Then ' Set prompt. Message = "Enter Product Name" ' Set title. title = "Product Name" defaultValue = "" ' Set default value. 'Display message, title, and default value. myValue = InputBox(Message, title, defaultValue) Button(X).Text = myValue End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

user input check int only

*爱你&永不变心* 提交于 2019-12-02 02:22:37
I am trying to have my user input not crash my program by restricting what the user can input such as: only being an int being between 1-30 The code that I've written works only up to a certain point. If you enter something thats not an int it will check it and ask you to enter again. Then again if you keep typing anything but an int. I have another while loop if it does type an int, and if it's outside the 1-30 zone then it will ask the user to input again. However after that if the user types another "anything but an int" the program will crash. I've tried to combine both the sc.hasnextint()

C++ CIN cin skips randomly

点点圈 提交于 2019-12-02 02:16:07
I have this program, but cin in randomly skips.. I mean sometimes it does, and sometimes it doesn't. Any ideas how to fix this? int main(){ /** get course name, number of students, and assignment name **/ string course_name; int numb_students; string assignment_name; Assignment* assignment; cout << "Enter the name of the course" << endl; cin >> course_name; cout << "Enter the number of students" << endl; cin >> numb_students; cout << "Enter the name of the assignment" << endl; cin >> assignment_name; assignment = new Assignment(assignment_name); /** iterate asking for student name and score **

user input check int only

牧云@^-^@ 提交于 2019-12-02 01:36:07
问题 I am trying to have my user input not crash my program by restricting what the user can input such as: only being an int being between 1-30 The code that I've written works only up to a certain point. If you enter something thats not an int it will check it and ask you to enter again. Then again if you keep typing anything but an int. I have another while loop if it does type an int, and if it's outside the 1-30 zone then it will ask the user to input again. However after that if the user

How to get one number from a user

你离开我真会死。 提交于 2019-12-02 00:34:24
问题 I'm just learning C, and having worked with languages as javascript and php up till now, i am having trouble converting some of my thinking steps to the possibilities of C. The program i am writing ( that sounds bigger than it really is ) uses an input menu that lets the user pick an option. The options can be 1, 2 or 3. Now, i'm doing: int menu; scanf("%d", &menu); Which works fine. However, entering a character of a string will cause problems. In javascript i'd simply match the menu

How to get one number from a user

我怕爱的太早我们不能终老 提交于 2019-12-01 21:55:40
I'm just learning C, and having worked with languages as javascript and php up till now, i am having trouble converting some of my thinking steps to the possibilities of C. The program i am writing ( that sounds bigger than it really is ) uses an input menu that lets the user pick an option. The options can be 1, 2 or 3. Now, i'm doing: int menu; scanf("%d", &menu); Which works fine. However, entering a character of a string will cause problems. In javascript i'd simply match the menu variable against the options: if ( menu != 1 && menu != 2 && menu != 3 ){ menu = 4; // a switch later on will