Linked Questions
51 questions linked to/from User input and command line arguments
-1 votes
2 answers
4k views
Conditional statements using temperature
If the temperature is 100 or above, the functions return “It is hot.”; If the temperature is between 70 and 100, the function returns “It is warm.”; If the temperature is between 32 and 70, the ...
1 vote
3 answers
975 views
Input And Print In Python
I am making a simple text based game but I can't even get past the second line of code. My code so far looks like this: print("Welcome To City Text! First You Must Name Your City.") Then the person ...
0 votes
2 answers
2k views
Python program not asking for input [duplicate]
I am trying to teach myself python by writing a simple program to test if a number is prime or not. It seems to me like the code should work but when I run it I am not getting asked to input a number ...
0 votes
1 answer
2k views
How to take multiple inputs from a user in Python [duplicate]
I'm trying to create a program where python will take multiple inputs until the user enters "END". Each input must be on a different line. I'm still new and learning python/programming in general so ...
0 votes
3 answers
1k views
Python 2.7.10 Prompt for user input
I'm working on an online tutorial for Python, & I'm trying to go a little farther for an example problem than it calls for. The objective is to rename all the files in a folder. My addition is to ...
-1 votes
2 answers
2k views
How to ask for an input and bubble sort that input? [duplicate]
It's my first time in coding in Python, I have created a code that bubbles sort a given list. This is my code: def bubbleSort(alist): for passnum in range(len(alist)-1,0,-1): for i in ...
0 votes
1 answer
2k views
Command Line input for Python Script [duplicate]
What I am trying to do here: I am trying to crawl yelp and get reviews from a particular page. However, I just want to modify this script to give "Restaurant name" as input. For example: User ...
-2 votes
1 answer
3k views
How can i "TIE" on my python TIC TAC TOE game
I am figuring out how to tie the game. I'm having difficulties. Can anyone provide a code to replace it or fix it?. Thank You. I programmed a tic tac toe game in python and it works perfectly fine ...
0 votes
2 answers
2k views
ask user enter a file to run the program with python
I have a program that concatenates French words separated by an asterisk in a text. As I want this program to be used by different users, I want to insert a line in the program asking the user to ...
2 votes
1 answer
823 views
Running Python script from vba with network paths
Scenario: I have a simple VBA code that should run a python script. Problem: For some reason, this code (which is a direct variation of what I found here: How to call python script on excel vba? ) ...
0 votes
1 answer
2k views
python set arguments option for function in command line [duplicate]
I have written simple function to cut lines in txt file, takes 3 arguments : cut(inicial_line, final_line, file) now how do i put inicial_line and final_line to -c option to execute it for example: ...
-1 votes
3 answers
549 views
Command-line Input (parameters) [duplicate]
I am very confused on how command-line input works, so for practice I was trying to take the following program down below and produce the same information but just by using command-line input, the ...
0 votes
1 answer
545 views
How can I pass a dynamic file from command line into a python code? [duplicate]
If I have a python code that currently works with static files but I wish to change it in a way that would allow it to accept dynamic files as well, how can I do so? Like this is my code in python: ...
1 vote
2 answers
649 views
How to get user input in Cloud9 (Python)
I've just started using Cloud9 to program with Python. But when I try to use Tkinter it gives me the error _tkinter.TclError: no display name and no $DISPLAY environment variable. How should I get ...
0 votes
0 answers
1k views
How to check for command line argument and if none, prompt for input through console?
This question was part of an assignment for a software class in college. I've long since quit but I'd really like to learn python so I'm revisiting some assignments. I've created a simple code that ...