Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: I built Tic-Tac-To
Post: RE: I built Tic-Tac-To
def status_print(game):
print("\n")
print(game[0])
print(game[1])
print(game[2])
def entry_check(num, XO, entry, valid_entries):
player_entry = input(f"Player {num}, enter pos... |
|
Shahmadhur13 |
Code Review |
6 |
3,359 |
May-08-2020, 09:15 AM |
|
|
Thread: number problem
Post: RE: number problem
This code is perfectly working without any error and with required result in Pycharm IDE, PYTHON 3.8
I'm student of medical/dentistry field and started my computer program learning since 3 weeks so i ... |
|
Shahmadhur13 |
Homework |
20 |
7,214 |
May-03-2020, 02:33 PM |
|
|
Thread: Problem in flattening list
Post: Problem in flattening list
I tried to flatten list.I have nested list and i want all iterables of that nested list in one list without any nested list. Itried with itertool.chain and also with recursive function.
import itert... |
|
Shahmadhur13 |
General Coding Help |
5 |
2,500 |
May-02-2020, 03:52 PM |
|
|
Thread: Tic-Tac game (Beginner's coding)
Post: RE: Tic-Tac game (Beginner's coding)
I tried to column1, 2, 3 and diagonal1, 2 variables in starting of while loop instead of repeating after each player's input entry.
But doing that, diagonal and column win condition never work out. |
|
Shahmadhur13 |
General Coding Help |
5 |
3,100 |
May-01-2020, 09:13 AM |
|
|
Thread: Tic-Tac game (Beginner's coding)
Post: Tic-Tac game (Beginner's coding)
I have tried to code Tic-Tac game.
I think my code needs lots of optimization but can't figure that out.
FYI: I haven't studied maths/matrix after schooling that is 15years ago.
That's why I used list... |
|
Shahmadhur13 |
General Coding Help |
5 |
3,100 |
May-01-2020, 06:48 AM |
|
|
Thread: number problem
Post: RE: number problem
here is final solution.
I have added few more code line to my previous post to arrive at solution.
sequence = True
all_entered_numbers = [0]
win_list = []
loss_list = []
high_num = 0
low_num = 0
loss... |
|
Shahmadhur13 |
Homework |
20 |
7,214 |
Apr-30-2020, 09:09 AM |
|
|
Thread: floating point not increasing properly
Post: RE: floating point not increasing properly
x=0.
while (x<=2):
x+=.1
print(format(x,'.1f'))You need to format output to limit digits after decimal point. |
|
Shahmadhur13 |
General Coding Help |
4 |
2,386 |
Apr-29-2020, 04:39 PM |
|
|
Thread: number problem
Post: RE: number problem
sequence = True
all_entered_numbers = [0]
win_list = []
loss_list = []
high_num = 0
low_num = 0
loss = []
while sequence:
current_num = int(input("enter a number: "))
if current_num >= 0:
... |
|
Shahmadhur13 |
Homework |
20 |
7,214 |
Apr-29-2020, 05:27 AM |
|
|
Thread: What is the purpose of this append command!
Post: RE: What is the purpose of this append command!
def square(x):
return x * x
def my_calculation(x, y):
result = []
for i in y:
result.append(x(i))
print(type(x))
return result
squares = my_calculation(square, ... |
|
Shahmadhur13 |
General Coding Help |
4 |
2,470 |
Apr-29-2020, 03:49 AM |
|
|
Thread: else condition not called when if condition is false
Post: RE: else condition not called when if condition is...
Yes sir, you're right.
I know I have far more code lines than actually needed.
For me, right now is to get things done with whatever I have learned till now. "enumerate" function i didn't learn till ... |
|
Shahmadhur13 |
General Coding Help |
10 |
5,856 |
Apr-29-2020, 03:19 AM |
|
|
Thread: else condition not called when if condition is false
Post: RE: else condition not called when if condition is...
import random
data = ["orange", "mango", "fridge", "mad", "smart", "love", "curtain", "chair", "table", "cable", "cake", "magic",
"rapid", "talcum", "absent", "music", "radio", "house", "sofa... |
|
Shahmadhur13 |
General Coding Help |
10 |
5,856 |
Apr-24-2020, 02:13 AM |
|
|
Thread: List structure lost when multiplying
Post: RE: List structure lost when multiplying
bd=[(0,0,0),(255,255,255)]
hg=[bd[0]]
print(hg*2) |
|
Shahmadhur13 |
General Coding Help |
2 |
2,235 |
Apr-23-2020, 03:21 AM |
|
|
Thread: Problems with if / else statement
Post: RE: Problems with if / else statement
money = int(input('amount of money: '))
multiplier = (input('enter t or h for thousands or hundreds: '))
if multiplier == "t":
print(money*1000)
else:
print(money*100)every input,python treat it a... |
|
Shahmadhur13 |
General Coding Help |
6 |
2,738 |
Apr-19-2020, 01:47 AM |
|
|
Thread: I code a program to solve puzzle but i can't make it more dynamic.
Post: RE: I code a program to solve puzzle but i can't m...
Wow!
TIL any() function.
Thank you so much. |
|
Shahmadhur13 |
General Coding Help |
5 |
2,730 |
Apr-18-2020, 10:05 AM |
|
|
Thread: I code a program to solve puzzle but i can't make it more dynamic.
Post: RE: I code a program to solve puzzle but i can't m...
Great! Thank you so much.
The second nested 'for' loop with 'else' was the key that i missed.
And of course learned that i should use 0 as a boolean even i was working with arithmetic. It optimized c... |
|
Shahmadhur13 |
General Coding Help |
5 |
2,730 |
Apr-16-2020, 09:30 PM |
|
|
Thread: I code a program to solve puzzle but i can't make it more dynamic.
Post: I code a program to solve puzzle but i can't make ...
# find the first number that is divided by 1 to 9 with 0 remainder
for i in range (10000):
x = i % 3
y = i % 4
z = i % 7
a = i % 5
b = i % 6
c = i % 8
d = i % 9
if x==y==z==a==b==c==d==0:
p... |
|
Shahmadhur13 |
General Coding Help |
5 |
2,730 |
Apr-16-2020, 08:52 PM |