CodeSolved

Solved Programming Questions & Exercises

Investigating the figures of the number

Practice Easy 1386/ Download 1078 Views

Write a program that receives a number of input and prints its smallest and largest digit

24 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
m=[]
n=input("enter:")
for i in n :
    m.append(int(i))
    m.sort()
x=len(m)    
print (f"min={m[0]}    max={m[x-1]}")
User 489 Download Python
while True:
    num = input("enter your number:")
    if num == "0":
        print("end")
        break
    dgh = [int(dgh) for dgh in num]
    mindgh = min(dgh)
    maxdgh = max(dgh)
    print(f"kochak tarin addad: {mindgh}")
    print(f"bozorgtarin addad: {maxdgh}")
Sumy.amiri Download Python
N1=int(input("Enter Number: "))
N2=int(input("Enter Number: "))

# ّ Find the Largest Number
largest = max(N1,N2)
print("This is the largest number:",largest)

# Find the smallest number
smallest = min(N1,N2)
print("This is the smallest number:",smallest)
Amirali Download Python
def s(number):
    digits = [int(digit) for digit in str(number)]
    max_digit = max(digits)
    min_digit = min(digits)
    return max_digit, min_digit
num=int(input("num: "))
max_digit, min_digit=s(num)
print(f"max: {max_digit}")
print(f"min: {min_digit}")
x = 0
a = input('enter the number')
for i in a :
    i = int(i)
    if x < i :
        x = i
z = x 
print(x,'بزرگترین رقم')
for j in a :
    j = int(j)
    if z > j :
        z = j
print(z,'کوچکترین رقم')
User 779 Download Python
print("enter you list")
x = input(list())
y = sorted(x) # From small to large to large
print(y)
Ali.r.h.z Download Python

Had three corrections that were corrected above Alvandsina


i=input('num:') 
s=[int(digit)for digit in i]
print(s)
Maryam.n Download Python
<< Previous page 1 2 3 Next page >>

Submit answer

Submitting answers is currently unavailable.

×
×
Close