#tashkhis adad mosbat manfi sefr
a=float(input("please enter a number:"))
if a>0:
print("Positive")
elif a==0:
print("Zero")
else:
print("Negative")
a=float(input("please enter a number:"))
if a>0:
print("Positive")
elif a==0:
print("Zero")
else:
print("Negative")
👍1
#tashkhis roozhaye mah
y=int(input("please enter a number:"))
if 1<=y<=6:
print("31 Days")
elif 7<=y<=11:
print("30 Days")
elif y==12:
print("29 Days")
else:
print("please enter number between 1 and 12")
y=int(input("please enter a number:"))
if 1<=y<=6:
print("31 Days")
elif 7<=y<=11:
print("30 Days")
elif y==12:
print("29 Days")
else:
print("please enter number between 1 and 12")
👍1
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