Commit 998d2e20 by BellCodeEditor

auto save

parent ecd9b244
Showing with 48 additions and 13 deletions
for i in range(3,101):
k=0
for j in range(2,i):
if i%j==0:
k=k+1
if k==0:
print(i)
\ No newline at end of file
class Hero: # a="123456dfghjdfghnjmfghjkxcvbn"
def __init__(self,name,hp,age): # for i in range(3,len(a)):
self.name=name # k=0
self.hp=hp # for j in range(2,i):
self.age=age # if i%j==0:
self.level=1 # k=k+1
DIO=Hero('DIO','999','128') # if k==0:
def up(self): # print(a[i-1])
self.hp=int(self.hp)+40 # a=input()
self.level=int(self.level)+1 # a=int(a)
up(DIO)
print(DIO.hp) #
\ No newline at end of file a=[]
m=0
x=10000
y=0
for i in range(10):
n=input()
n=int(n)
a.append(n)
print(a)
for j in range(len(a)):
for i in range(j,len(a)):
# if a[i]>a[i+1]:
# m=a[i]
# a[i]=a[i+1]
# a[i+1]=m
# print(a)
x=a[i]
if a[i]<x:
x=a[i]
m=i
y=a[j]
a[j]=x
a[m]=y
print(a)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment