تمرین برنامه نویسی؛ با کدبزن!

منبع جامع سوالات و تمرینات برنامه نویسی

1
+1

بزرگترین عدد دریافت شده

Admin آسان 6/ دانلود 3208 بازدید

برنامه ای بنویسید که 3 عدد دریافت کند و بزگترین آنها را در خروجی چاپ کند

64 جواب

نمیتونم این تمرین رو حل کنم!
4
+1
+1
+1
a = float(input('num1: '))
b = float(input('num2: '))
c = float(input('num3: '))
if a>c>b or a>b>c:
    print(a)
elif b>a>c or b>c>a:
    print(b)
elif c>a>b or c>b>a:
    print(c)
Amirtaha دانلود Python

جالبه اینکه با چندین روش میشه یه کار انجام داد از نقاط قوت و جذاب برنامه نویسی هست کاربر 1098


4
+1
+1
+1
print(max([int(input('num1: ')),int(input('num2: ')),int(input('num3: '))]))
Ordinaryperson دانلود Python

Good job Javadmirjalili


تمیز و خلاصه👏🏼 1pymmah0


2
+1
+1
num1 = float(input("enter number 1: "))
num2 = float(input("enter number 2: "))
num3 = float(input("enter number 3: "))
if num1 > num2 and num1 > num3:
  print("{} is the largest number".format(num1))
elif num2 > num1 and num2 > num3:
  print("{} is the largest number".format(num2))
else:
  print("{} is the largest number".format(num3))
Aryan84 دانلود Python
2
+1
+1
d = int(input("enter the first number:"))
b = int(input("enter the second number:"))
s = int(input("enter the third number:"))
maximum = s

if b > max :
    maximum = b
if d > max :
    maximum = d

print(maximum)
Afra1919 دانلود Python
1
+1
a = int(input('yek adad vared konid:'))
b = int(input('yek adad vared konid:'))
c = int(input('yek adad vared konid:'))
max = a
if b > max:
  max = b
if c > max:
  max = c

print(max) 
Admin دانلود Python
1
+1
a =int(input('number1 :')
b = int(input('number2 :')
c =int(input('number 3:')
if a > b and a > c :
    Print('number 1 is the largest')
elif b > a and b > c :
    Print('number2 is the largest')
elif c > a and c > b :
    Print('number 3 is the largest') 
Mla23 دانلود Python
1
+1
a = int ( input("ent 1 :") )
b = int ( input("ent 2 :") )
c = int ( input ("ent 3:") )
if a>b and a > c :
  print ('biggest is:' ,a)
elif b>a and b > c :
  print ('biggest is :',b)
elif c>a and c>b :
  print ('biggest is:',c)
elif a==b and a==c and b==c :
  print ("Same result")
Pouriya دانلود Python
1
+1
a = input("number one: ")
a = int(a)
b = input("number two: ")
b = int(b)
c = input("number tree: ")
c = int(c)

if a > b and a > c :
  print(a)

elif b > a and b > c :
  print(b)
elif c > a and c > b :
  print(c)
  
else :
  print("har se adad mosavi")
Miladkhan دانلود Python
1
+1
list = []

while len(list) < 3 :
  a = int(input("adad ra vared konid : "))
  list.append(a)

list_betartib = sorted(list)
print("min = {} , max = {}".format(list_betartib[0] , list_betartib[2])) 
Nima280 دانلود Python
1
+1
adad1 = int(input('adad 1: '))
adad2 = int(input('adad 2: '))
adad3 = int(input('adad 3: '))

if adad1>adad2>adad3:
  print (adad1)
elif adad1<adad2<adad3:
  print (adad3)
elif adad1<adad2>adad3:
  print (adad2)
4t3in دانلود Python
1
+1
a = float(input("first number :  "))
b = float(input("second number :  "))
c = float(input("third :  "))

if a>b>c or a>c>b :
    print(str(a) + "  is bigest")
elif b>a>c or b>c>a :
    print(str(b) + "  is bigest")
elif c>b>a or c>a>b :
    print(str(c) + "  is bigest")
else : print('error')
He3am دانلود Python
1
+1
a= float(input("a: "))
b=float(input("b: "))
c= float(input("c: "))

if a>=b and b>=c:
    print(a)
elif b>=a and b>=c:
    print(b)
elif c>=a and c>=b:
    print(c)
if a==b==c:
    print("3 adad mosavi")
Farzad777 دانلود Python
1
+1
m = int(input('age:'))
n = int(input('age:'))
b = int(input('age:'))
a = 1


if m > a :
    a = m
if n > a :
    a = n 
if b > a : 
    a = b
print(a)
Mayoka دانلود Python
1
+1
def number():
	num=[]
	a=int(input("number 1 : "))
	num.append(a)
	b=int(input("number 2 : "))
	num.append(b)
	c=int(input("number 3 : "))
	num.append(c)
	print(max(num))
number()
Lorex دانلود Python
0
x= int (input("number 1 ? "))
y= int (input("number 2 ? "))
z= int (input("number 3 ? "))
if(x>y and x>z):
  print(f"{x} is the largest number")
elif (y>x and y>z):
  print (f"{y} is the largest number")
else:
  print (f"{z} is the largest number")
Tamara دانلود Python
0
a = int(input("One number:"))
b = int(input("Two number:"))
c = int(input("Three number:"))
if a > b or a > c:
    print(f"number one {a} The first number is the largest")
else:    
    if b > a or b > c :
        print(f"number two {b} The first number is the largest")
    else:
        print(f"number three {c} The first number is the largest")  
Hossein دانلود Python
0
x = int(input("X: "))
y = int(input("Y: "))
z = int(input("Z: "))


if x > y:
    if x > z:
        print(x)
    else: 
        print(z)
else:
    print(y) 
Saman22 دانلود Python
0
x = float(input("number1:"))
y = float(input("number2:"))
z = float(input("number3:"))
if (x>y and x>z):
  print(f"{x} is largest number")
elif (y>x and y>z):
  print(f"{y} is largest number" )
else:
  print(f"{z} is largest number ")
کاربر 166 دانلود Python
0
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
num3 = float(input("Enter the third number: "))

# Find the maximum of the three numbers using the built-in max function
max_num = max(num1, num2, num3)

print("The maximum number is: ", max_num)
Masterman دانلود Python
0
1 = float(input ( "number1" ))
2 = float(input ( "number2" ))
3 = float(input ( "number3" ))
4 = "largest"
if (1 > 2  and 1 > 3 ) ( 1 == 4)
elif ( 2 > 1 and 2 > 3 ) ( 1 == 4 )
elif ( 3 > 1 and 3 > 2 ) ( 1 == 4 )
  
Sina123 دانلود Python
0
a = int(input("nimber : "))
b = int(input("nimber : "))
c = int(input("nimber : "))

if a > b and c:
    print(a)
elif b > c:
    print(b)
else:
    print(c)

Amirhossein88 دانلود Python
0
x = int(input("Enter the first number :"))
a = int(input("Enter the second number :"))
b = int(input("Enter the third number :"))

if (x<a,b) :
    print("The first number is bigger.")
elif (a<b,x) :
    print("The second number is bigger.")
elif (b<a,x) :
    print("The third number is bigger.")

کاربر 308 دانلود Python
0
x = int(input("Enter the first number :"))
a = int(input("Enter the second number :"))
b = int(input("Enter the third number :"))


if x>a and x>b:
    print("The first number is bigger.")
elif a>b and a>b:
    print("The second number is bigger.")
elif b>a and b>x:
    print("The third number is bigger.")  

کاربر 308 دانلود Python
0
num1 = int(input('Enter your a Number1: '))
num2 = int(input('Enter your a Number2: '))
num3 = int(input('Enter your a Number4: '))
temp = 0

maxnumber = num1 if num1 > num2 else num2
maxnumber = maxnumber if maxnumber > num3 else num3

print(maxnumber)
#------------------------------------------------------------------------------------------------------
num1 = int(input('Enter your a Number1: '))
num2 = int(input('Enter your a Number2: '))
num3 = int(input('Enter your a Number4: '))
temp = 0

if num1 > num2:
  temp = num1
  num1 = num2
  num2 = temp

if num1 > num3:
  temp = num1
  num1 = num3
  num3 = temp

if num2 > num3:
  temp = num2
  num2 = num3
  num3 = temp
  
print(f'the maximum number is : {num3}')
Amir1 دانلود Python
0
print('kodom bozorgtare?')
a=float(input('adad 1 : '))
b=float(input('adad 2 : '))
c=float(input('adad 3 : '))
if a>b and a>c:
    print('{} bozorgtar ast'.format(a))
elif b>a and b>c:
    print('{} bozorgtar ast'.format(b))
elif c>a and c>b:
    print('{} bozorgtar ast'.format(c))
کاربر 442 دانلود Python
0
num1=int(input("Please Enter Number1: "))
num2=int(input("Please Enter Number2: "))
num3=int(input("Please Enter Number3: "))

result=max(num1,num2,num3)
print('Maximum Number Between %d,%d and %d is %d'%(num1,num2,num3,result))
Mahan78 دانلود Python
0
nam1 = int (input("enter nomber 1 : ") )
nam2 = int (input ("enter nomber 2 : "))
nam3 = int (input ("enter nomber 3 :"))


if nam1>nam2 and nam1>nam3 :
    print ("{} is the biggest " .format (nam1))


elif nam2>nam1 and nam2>nam3 :
    print ("{} is the biggest " . format (nam2))


elif nam3>nam2 and nam3>nam1 :
    print ("{} is the biggest " .format (nam3))
کاربر 499 دانلود Python
0
a = int(input())
b = int(input())
c = int(input())
d = 0
if a > b and a > c:
    print(a)
elif b > a and b > c:
    print(b)
elif c > a and c > b:
    print(c)



Amirhossein دانلود Python
0
a=int(input(' enter a number: '))
b=int(input(' enter a number: '))
c=int(input(' enter a number: '))
if a>b and a>c:
	print(bozrgtar ast')
elif b>a and b>c:
	print(b,'bozorgtar ast ')
else:
	print(c,' bozorgtar ast')
	


Abtin67 دانلود Python
0
a = int(input("first  number:"))
b = int(input("second number:"))
c = int(input("thired number:"))
max = 0
if a > max:
    max = a
if b > max:
    max = b
if c > max:
    max = c
print("max is:", max)

Negar دانلود Python
0
num1 = int(input('Enter your a Number1: '))
num2 = int(input('Enter your a Number2: '))
num3 = int(input('Enter your a Number3: '))
list_of_nums = [num1, num2, num3]
print(max(list_of_nums))
کاربر 568 دانلود Python
0
a=[int(input('num1: ')),int(input('num2: ')),int(input('num3: '))]
if a[0]==a[1]or a[0]==[2]or a[1]==a[2]:print('Your numbers are equal')
else:print(int(max(a)))
Ordinaryperson دانلود Python
0
a = int(input("a:"))
b = int(input("b:"))
c = int(input("c:"))

max = 0
if a > max:
    max = a

    if b > max:
        max = b

    if c > max:
        max = c

print (max)  
کاربر 540 دانلود Python
0
number1 = input("enter number 1: ")
number2 = input("enter number 2: ")
number3 = input("enter number 3: ")
print(max(number1))
print(max(number2))
print(max(number3))
کاربر 447 دانلود Python
0
b = []
for i in range(1, 4):
    num = int(input(f"Please enter your number {i}:"))
    b.append(num)
print(f"Your maximum number is {max(b)}")
F2030 دانلود Python
0
adad_bozorg = 0

a = int(input('adad 1:'))
b = int(input('adad 2:'))
c = int(input('adad 3:'))


if a > adad_bozorg :
    adad_bozorg = a


if b > adad_bozorg :
    adad_bozorg = b


if c > adad_bozorg :
    adad_bozorg = c


print('-' * 50)
print(adad_bozorg)
print('-' * 50)  
Rtmobin دانلود Python
0
x = int(input('enter : '))
v = int(input('enter : '))
c = int(input('enter : '))
print(max(x, v, c))
کاربر 1224 دانلود Python
0
a = float(input("First Number = "))
b = float(input("Seccond Number = "))
c = float(input("Third Number = "))

max = 0 

if a > max:
    max = a
if b > max:
    max = b
if c > max:
    max = c
print("{} is largest number you enterd.".format(max))

quit = input("Press ENTER to close")
Pooria08 دانلود Python
0
a =float(input("Enter"))
b =float(input("Enter"))
c =float(input("Enter"))

if a>c>b or a>b>c:
    print("bigges number:", a)
elif b>a>c or b>c>a:
    print("biggest number:",b)
else:
    print("biggest number:",c)
کاربر 1393 دانلود Python
0
name1 = int(input("number 1: "))
name2 = int(input("number 2: "))
name3 = int(input("number 3: "))

max = 0

if max < name1:
  max = name1

if max < name2:
  max = name2

if max < name3:
  max = name3
  
print("the highest number is", max)
کاربر 1301 دانلود Python
0
num1 = int(input("E1: "))
num2 = int(input("E2: "))
num3 = int(input("E3: "))

print(max(num1, num2, num3))
Ha3an دانلود Python
0
a = float (input ("num 1: "))
b = float (input ("num 2: "))
c = float (input ("num 3: "))

print (max(a,b,c))
Alikhosravi9775 دانلود Python
0
a = float (input ("Num1?:"))
b = float (input ("Num2?:"))
c = float (input ("Num3?:"))

if a>b>c or a>b>c:
  print (a)

if b>a>c or b>c>a:
  print (b)

if c>a>b or c>b>a:
  print (c)
Alikhosravi9775 دانلود Python
0
inp1 = input("Numbers: ").split(',')
print(max(inp1))
M1e1k دانلود Python
0
first = int(input("Enter the first number:"))
second = int(input("Enter the second number:"))
third = int(input("Enter the third number:"))

print(max(first, second, third))
Javadmirjalili دانلود Python
0
n = int(input("enter your number: "))
m = int(input("enter your number: "))
h = int(input("enter your number: "))


if n > m and n > h :
  print (n)
elif m > n and m > h :
  print (m)
elif h > n and h > m :
  print (h)
else :
  print("Your answer is wrong")
کاربر 1645 دانلود Python
0
print(max(float(input ("adad a vared konid   ")),float(input ("adad b vared konid   ")),float(input ("adad c vared konid   "))))
کاربر 1785 دانلود Python
0
n1 = int(input("first number: n1="))
n2 = int(input("second number: n2="))
n3 = int(input("third number: n3="))
print (f'maximum number:{max(n1, n2, n3)}')
کاربر 1842 دانلود Python
0
a=int(input("adadeh avval ra vared konid : "))
b=int(input("adadeh dovoom ra vared konid :"))
c=int(input("adadeh sevoom ra vared konid :"))
if a>b and a>c :
    print(a)
elif b>a and b>c:
    print(b)
else :
    print(c)    
Mohsen0safari دانلود Python
0
A = int(input('عددی وارد کنید '))
B = int(input('عدد دوم را وارد کنید '))
C = int(input('عدد سوم را وارد کنید '))
if A>B>C:
  print(A)
elif B>A>C:
  print(B)
elif C>A>B:
  print(C)
کاربر 1941 دانلود Python
0
def my_number(a,b,c):
            if a >b and a>c:
                print(a)
            elif b >a and b>c:
                print(b)
            else:
                print(c)
a = int(input("enter number1:"))
b = int(input("enter number2:"))
c = int(input("enter number3:"))       
my_number(a,b,c)
Alirezaakbari دانلود Python
0
a=float(input("enter your frist digit: "))
b=float(input("enter your secend digit: "))
c=float(input("enter your third digit: "))

if a>b and a>c:
    print("{} is bigger".format(a))
elif b>a and b>c:
    print("{} is bigger".format(b))
elif c>a and c>b:
    print("{} is bigger".format(c))
elif a==b>c:
    print("your {} and {} are biggers".format("frist digit","secend digit"))
elif a==c>b:
    print("your {} and {} are biggers".format("frist digit","third digit"))
elif b==c>a:
    print("your {} and {} are biggers".format("secend digit","third digit"))
else:
    print("None of those is not bigger")
Asgaryam دانلود Python
0
a =int(input('1namner:'))
s =int(input('2namner:'))
d =int(input('3namner:'))
if a>s>d or a>d>s:
    print(a)
elif s>d>a or s>a>d:
    print(s)
elif d>s>a or d>a>s:
    print(d)    
else:
    print("{}={}={}".format(a ,s, d))        
کاربر 2019 دانلود Python
0
a = int(input("please enter number 1 :"))
b = int(input("please enter number 2 :"))
c = int(input("please enter number 3 :"))

if a>b and a>c:
 print("maximum :",a)
elif b>a and b>c:
 print("maximum :",b)
elif c>a and c>b:
 print("maximum :",c)
else :
 print("error")
Amirhosseint دانلود Python
0
#تابع بزرگترین عدد 
def MAX():
    #لیست محل ذخیره اعداد
    list_max=[]
    #عدد مورد نظر برای افزودن به لیست
    number=int(input('enter a number: '))
    #حلقه وایل برای دادن مقادیر نامبر به لیست
    while number!=-1:
        list_max.append(number)
        number=int(input('enter a number: '))
    #متغییر مکس برای به دست آوردن بزرگ ترین
    max=list_max[0]
    #حلقه فور برای بررسی بزرگترین مقدار
    for i in range(1,len(list_max)):
        if max<=list_max[i]:
            max=list_max[i]
    #مقدار ریتورن شده توسط تابع 
    return max
#فراخوانی تابع
print(MAX())
Knowledgebiome دانلود Python
0
a = int(input("enter number 1:"))
b = int(input("enter number 2:"))
c = int(input("enter number 3:"))
print(a,"bozorg tar ast") if a > b and a >c else (print(b,"bozorg tar ast")) if b > a and b > c  else print(c,"bozorg tar ast")  
Alirezaakbari دانلود Python
0
firstNumber = input('please enetr a first number : ')
secondNumber = input('please enetr a second number : ')
thirdNumber = input('please enetr a third number : ')

if firstNumber > secondNumber and firstNumber > thirdNumber:
     print(firstNumber)
elif secondNumber > thirdNumber:
     print(secondNumber)
else:
     print(thirdNumber)
کاربر 2015 دانلود Python
0
num1=float(input('first number : '))
num2=float(input('second number : '))
num3=float(input('third number : '))

numbers=[]

numbers.append(num1)
numbers.append(num2)
numbers.append(num3)

numbers=sorted(numbers)
print(numbers[-1])

Soheyl دانلود Python
0
a=int(input("please type first number: "))
b=int(input("please type second number: "))
c=int(input("please type third number: "))
mlist=[a,b,c]
max_list=max(mlist)
print(max_list)
Sinathedan دانلود Python
0
a=int(input("x"))
b=int(input("y"))
c=int(input("w"))
if a>b>c :
   print(a)
elif a>c>b:
    print(a)
if b>a>c :
   print(b)
elif b>c>a:
    print(b)


if c>a>b :
   print(b)
elif c>b>a:
    print(b)
کاربر 2165 دانلود Python
0
list_of_nums = []
for i in range(3):
    number = int(input("Enter number: "))
    list_of_nums.append(number)

print(f"maximum number: {max(list_of_nums)}")
Erphan دانلود Python
0
one_num = float(input('num1: '))
two_num = float(input('num2: '))
three_num = float(input('num3: '))

max_number = max(one_num, two_num, three_num)
print("The largest number : ", max_number)
کاربر 2226 دانلود Python
0
a=int(input("a="))
b=int(input("b="))
c=int(input("c="))
if a<b and a>c :
  print("bozorgtarin adad=",a)
elif b>a and b>c :
  print("bozorgtarin adad=",b)
else :
  print("bozorgtarin adad=",c)
Alireza949 دانلود Python
0
x = int(input("number 1:"))
y = int(input("number 2:"))
z = int(input("number 3:"))

print(max(x,y,z))
Mohisara321 دانلود Python

ارسال جواب

// کداتو توی این بخش بنویس
// فرقی نمیکنه چه زبان برنامه نویسی باشه، همرو پشتیبانی میکنیم :)
// البته قبلش این سه خط رو پاک کن


  • تو جوابت میتونی از تصویر، کد، لینک به سایر صفحات و... استفاده کنی
  • لطفا جواب های تکراری ارسال نکن
  • جواب های ارسالی، پس از بررسی کوتاهی، ویرایش میشن و در سایت نمایش داده میشن
  • ارسال جواب حق مادی یا معنوی برای ارسال کننده ایجاد نمیکند و تمام حقوق برای سایت کدبزن محفوظ است

تمرینات مرتبط

تشخیص با استفاده از هوش مصنوعی
×
×
بستن