x=float(input("please enter a number:"))
if 17<=x<=20:
print("Kheyli khoob")
elif 15<=x<17:
print("khob")
elif 12<=x<15:
print("ghabel ghabool")
elif 0<=x<12:
print("Niaz be talash bishtar")
else:
print("LotfaN ADADi beyn 0 ta 20 vared konid:")
if 17<=x<=20:
print("Kheyli khoob")
elif 15<=x<17:
print("khob")
elif 12<=x<15:
print("ghabel ghabool")
elif 0<=x<12:
print("Niaz be talash bishtar")
else:
print("LotfaN ADADi beyn 0 ta 20 vared konid:")
👍1
#morab az ma4rkaz
import turtle
t=turtle.Pen()
turtle.bgcolor('black')
dist=0.35
for i in range(2):
t.pencolor("white")
t.forward(dist)
t.rt(90)
dist=dist+0.5
import turtle
t=turtle.Pen()
turtle.bgcolor('black')
dist=0.35
for i in range(2):
t.pencolor("white")
t.forward(dist)
t.rt(90)
dist=dist+0.5
👍1
#Bazi Sang Kaghaz gheychi
#sang==>S kaghaz==>K gheychi==>G
p1=input("Player 1 lotfan sang:S kaghaz:K gheychi:G ")
p2=input("Player 2 lotfan sang:S kaghaz:K gheychi:G ")
if p1==p2:
print("player1 and player 2 mosavi")
elif p1=="S" and p2=="G":
print("player1 barandeh shod")
elif p1=="K" and p2=="S":
print("player1 barandeh shod")
elif p1=="G" and p2=="K":
print("player1 barandeh shod")
elif p2=="S" and p1=="G":
print("player2 barandeh shod")
elif p2=="K" and p1=="S":
print("player2 barandeh shod")
elif p2=="G" and p1=="K":
print("player2 barandeh shod")
else:
print("lotfan faghat S G K ra entekhab konid")
#sang==>S kaghaz==>K gheychi==>G
p1=input("Player 1 lotfan sang:S kaghaz:K gheychi:G ")
p2=input("Player 2 lotfan sang:S kaghaz:K gheychi:G ")
if p1==p2:
print("player1 and player 2 mosavi")
elif p1=="S" and p2=="G":
print("player1 barandeh shod")
elif p1=="K" and p2=="S":
print("player1 barandeh shod")
elif p1=="G" and p2=="K":
print("player1 barandeh shod")
elif p2=="S" and p1=="G":
print("player2 barandeh shod")
elif p2=="K" and p1=="S":
print("player2 barandeh shod")
elif p2=="G" and p1=="K":
print("player2 barandeh shod")
else:
print("lotfan faghat S G K ra entekhab konid")
👍2
#maghsoom aleyh
#15: 1 3 5 15
#28:1 2 4 7 14 28
num1=int(input("please enter a number:"))
for i in range(1,num1+1,1):
if num1%i==0:
print(i)
#15: 1 3 5 15
#28:1 2 4 7 14 28
num1=int(input("please enter a number:"))
for i in range(1,num1+1,1):
if num1%i==0:
print(i)
👍2
#tarsim jadval zarb 10 * 10
for i in range(1,11,1):
for j in range(1,11,1):
print(i*j,end="\t")
print()
for i in range(1,11,1):
for j in range(1,11,1):
print(i*j,end="\t")
print()
👍1
import turtle
s=turtle.Screen()
t=turtle.Pen()
for i in range(1,25,1):
t.forward(100)
if i%2==0:
t.left(125)
else:
t.left(205)
s=turtle.Screen()
t=turtle.Pen()
for i in range(1,25,1):
t.forward(100)
if i%2==0:
t.left(125)
else:
t.left(205)
👍1