Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Tic-Tac-Toe
Post: RE: Tic-Tac-Toe
Yes, unfortunately, my paradigm is very convoluted; but this is the way that I am supposed to write the code for the program. My professor even acknowledges that using the global variables is not des... |
|
juliabrushett |
Homework |
7 |
5,244 |
Jul-19-2018, 05:46 AM |
|
|
Thread: Tic-Tac-Toe
Post: Tic-Tac-Toe
Hello!
I am trying to make a Tic-Tac-Toe game, and I am having trouble with the 'X' and 'O' characters showing up in my program. My code is below:
from tkinter import *
grid = [[0 for i in range(3... |
|
juliabrushett |
Homework |
7 |
5,244 |
Jul-17-2018, 07:57 AM |
|
|
Thread: Getting Input from Tkinter Entry
Post: Getting Input from Tkinter Entry
Hello,
I am wanting to do some calculations using interest, total amount, and years to pay of an item, but I am having trouble getting and using the user input from a tkinter entry. Can someone help... |
|
juliabrushett |
GUI |
6 |
21,338 |
Jul-16-2018, 05:35 AM |
|
|
Thread: parameter in function being involuntarily converted to str??
Post: RE: parameter in function being involuntarily conv...
Yes, I did, thank you. My sum is spitting out "0".
def sumTo(x, y):
s = 0
if(x > y):
x, y = y, x
else :
x, y = y, x
while(x <= y):
s = s + x
x +... |
|
juliabrushett |
Homework |
8 |
4,557 |
Jul-02-2018, 06:01 AM |
|
|
Thread: How to exclude characters when counting digits
Post: RE: How to exclude characters when counting digits
I tried that, but I am returning 0 now (because isdigit() looks for a strings with ALL characters).. How can I fix this?
def countDigits(s) :
digits = 0
x = len(s)
for i in range(0, x, 1... |
|
juliabrushett |
Homework |
19 |
9,292 |
Jul-02-2018, 05:50 AM |
|
|
Thread: How to exclude characters when counting digits
Post: How to exclude characters when counting digits
Hello
I am trying to write a program that will count only numeric digits within a string, excluding all letters. What I have currently counts EVERYTHING. How do I fix this?
def countDigits(digits) ... |
|
juliabrushett |
Homework |
19 |
9,292 |
Jul-02-2018, 05:01 AM |
|
|
Thread: parameter in function being involuntarily converted to str??
Post: RE: parameter in function being involuntarily conv...
Oh, thank you! I am still receiving this error message, though:
Traceback (most recent call last):
File "C:\Users\Julia\Desktop\Python\Assignment11\Assignment11\Assignment11.py", line 16, in <m... |
|
juliabrushett |
Homework |
8 |
4,557 |
Jul-02-2018, 03:59 AM |
|
|
Thread: parameter in function being involuntarily converted to str??
Post: parameter in function being involuntarily converte...
My program is to take in two numbers from a user, then sum all the values shared between those two numbers. I am not sure why my program isn't running.
The error message that pops up is as follows:
... |
|
juliabrushett |
Homework |
8 |
4,557 |
Jul-02-2018, 03:17 AM |
|
|
Thread: Error?
Post: Error?
The object of my program is to calculate one side of a triangle using pythagorean theorem. I feel like my code should work, but I keep receiving this error message:
Error:Traceback (most recent call ... |
|
juliabrushett |
Homework |
9 |
4,877 |
Jul-02-2018, 03:07 AM |
|
|
Thread: Calling function-- how to call simply return value, not whole process
Post: RE: Calling function-- how to call simply return v...
I figured it out! Can't believe I forgot to put the value in the formal parameters:/ |
|
juliabrushett |
Homework |
2 |
3,196 |
Jul-01-2018, 01:17 AM |
|
|
Thread: Calling function-- how to call simply return value, not whole process
Post: Calling function-- how to call simply return value...
Hello,
The program I am creating will take in a value produced by the user and output both that value and the square of the value. I am to use functions for both intaking and squaring the value. Ho... |
|
juliabrushett |
Homework |
2 |
3,196 |
Jul-01-2018, 12:55 AM |
|
|
Thread: While loop confusion
Post: While loop confusion
Hello,
I am trying to create a guessing game that chooses a random number for the player to guess, outputs the number of guesses the player made before guessing correctly, and then asks the player if ... |
|
juliabrushett |
Homework |
2 |
2,621 |
Jun-23-2018, 06:54 AM |
|
|
Thread: Converting str to int or float
Post: Converting str to int or float
Hello,
My assignment is to take in an expression(such as 4 + 5), then calculate. I am to use the .split() function to separate parts of the statement. I think my program should work, I am having tro... |
|
juliabrushett |
Homework |
6 |
5,250 |
Jun-16-2018, 06:53 PM |
|
|
Thread: Trouble with assigning a string value in conditional statement
Post: Trouble with assigning a string value in condition...
Hello,
I am having trouble assigning a string value (namely, "Odd" or "Even") to val in my conditional operator. I am to have a user input a number, use a conditional operator to determine whether t... |
|
juliabrushett |
Homework |
1 |
2,537 |
Jun-16-2018, 06:18 PM |