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:
def __init__(self,name,hp,age):
self.name=name
self.hp=hp
self.age=age
self.level=1
DIO=Hero('DIO','999','128')
def up(self):
self.hp=int(self.hp)+40
self.level=int(self.level)+1
up(DIO)
print(DIO.hp)
\ No newline at end of file
# a="123456dfghjdfghnjmfghjkxcvbn"
# for i in range(3,len(a)):
# k=0
# for j in range(2,i):
# if i%j==0:
# k=k+1
# if k==0:
# print(a[i-1])
# a=input()
# a=int(a)
#
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