Python class jahad
14 subscribers
2 photos
6 files
4 links
Download Telegram
#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")
👍2
برنامه چاپ اعداد ١ تا ١٠ 👇:
#for
#1 2 3 4 5 6 7 8 9 10
for i in range(1,11,1):
print(i)
👍2
برنامه چاپ اعداد زوج ٢ تا ١٠٠٠٠٠ 👇:
#for
#2 4 6 8 10 12 14 16 ,
for i in range(2,100001,2):
print(i)
👍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)
👍2
برنامه چاپ پنج سطر كاراكتر 👇:
#tarsim ************
for i in range(1,5,1):
print("*$*$*$")
👍2
برنامه چاپ مربع تو پر 👇:
#tarsim moraba to por
for i in range(1,11,1):#roye satr
for j in range(1,11,1):#roye soton
print("*",end=" ")
print()
👍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()
👍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)
👍1
برنامه هاي جلسه ششم؛ ١٤٠٢/٠٥/٢٦ 👇:
برنامه نمايش مربع توخالي 👇:
#nemayesh morabae too khali
for i in range(1,10,1):
for j in range(1,10,1):
if i==1 or j==1 or i==9 or j==9:
print("*",end=" ")
else:
print(" ",end=" ")
print()
👍2
برنامه نمايش حرف N 👇:
#nemayesh harfe N
for i in range(1,10,1):
for j in range(1,10,1):
if j==1 or j==9 or i==j:
print("*",end=" ")
else:
print(" ",end=" ")
print()
👍2