Linked Questions

-1 votes
2 answers
4k views

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 ...
Hidu's user avatar
  • 19
1 vote
3 answers
975 views

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 ...
Ethan Bacon's user avatar
0 votes
2 answers
2k views

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 ...
user3282276's user avatar
  • 3,824
0 votes
1 answer
2k views

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 ...
polkapen's user avatar
0 votes
3 answers
1k views

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 ...
JMichael's user avatar
  • 558
-1 votes
2 answers
2k views

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 ...
user3467152's user avatar
0 votes
1 answer
2k views

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 ...
Dark Knight's user avatar
-2 votes
1 answer
3k views

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 ...
Zelandini Borromeu Guterres's user avatar
0 votes
2 answers
2k views

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 ...
Natalia Resende's user avatar
2 votes
1 answer
823 views

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? ) ...
DGMS89's user avatar
  • 1,711
0 votes
1 answer
2k views

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: ...
Володимир Кельбель's user avatar
-1 votes
3 answers
549 views

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 ...
FootOfGork's user avatar
0 votes
1 answer
545 views

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: ...
minks's user avatar
  • 3,059
1 vote
2 answers
649 views

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 ...
Pro Q's user avatar
  • 5,230
0 votes
0 answers
1k views

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 ...
MaximusCodes's user avatar

15 30 50 per page