“Python a Java Converter” Código de respuesta

Python a Java Converter

def shiftLeft(source,k):
    i=0
    while(i<=(len(source)-k-1)):
        source[i]=source[i+k]
        i=i+1
    i=len(source)-1
    while(i>=len(source)-k):
        source[i]=0
        i=i-1
    print(source)
source=[10,20,30,40,50,60]
shiftLeft(source,3)
Yucky Yak

Python a Java Converter

input1=input("Enter a 4-digit number: ")

input2 =input("Enter a 4-digit number: ")

input3 =input("Enter a 4-digit number: ")

print()

ul = list()

tl = list()

hl=list()

thl=list()

ul.append(input1[-1])

tl.append(input1[-2])

hl.append(input1[-3])

thl.append(input1[-4]) ul.append(input2[-1])

tl.append(input2[-2])

hl.append(input2[-3])

thl.append(input2[-4])

ul.append(input3[-1]) tl.append(input3[-2])

hl.append(input3[-3])

thl.append(input3[-4])

um = max(ul)

tm = max(tl)

hm = max(hl)

thm = max(thl)

print(thm + hm + tm + um)
Manoj R

Python a Java Converter

print('jjj');
Inexpensive Ibex

Python a Java Converter

array=list(map(int,input().split(",")))
array=sorted(array)
j=[]
j.append(array[0])
j.append(array[1])
for i in range(2,len(array)):
    if j[i-1]+j[i-2] in array:
        j.append(j[i-1]+j[i-2])
    else:
        break
print(j)
Tame Toad

Python a Java Converter

import math
st = input()
sumi = 0
che = 0
for i in st:
    sumi+=ord(i)
for j in str(sumi):
    # print(j)
    che+=pow(int(j),len(str(sumi)))
res = []
flag = False
if che==sumi:
    res = list(dict.fromkeys(st))
    flag = True
if flag:
    for i in res:
        print(i,end="")
else:
    print(-1)
Stormy Snail

Python a Java Converter

def getUmbrellas(requirement, sizes):
    for i in sizes:
        if i > requirement:
            pass
        else:
            q = requirement / i
            r = requirement % i
            if r == 0:
                return q
            if r in sizes:
                return q + 1
        return -1
Brave Barracuda

Python a Java Converter

sorted(iterable, key=None, reverse=False)
Quaint Quagga

Python a Java Converter

a-int(input())

1=list (map(int,input().split()))

1. sort()

b-max(1)

c=min (1)

print (b-c)
Precious Pelican

Python a Java Converter

import math



print('Penentuan akar bilangan')

bilangan = int(input('Bilangan='))



a=1

b=bilangan

EPSILON = 1e-10

while b-a > EPSILON:

    x = (a+b)/2

    if x*x > bilangan:

        b=x

    else:

        a=x

        

akar = a



print('Akar', bilangan,'=', akar)

print('Hasil math.sqrt()=', math.sqrt(bilangan))
Famous Finch

Python a Java Converter

self.assert_element_not_visible("div#drop2 img#logo")
        self.drag_and_drop("img#logo", "div#drop2")
        self.assert_element("div#drop2 img#logo")
Frightened Finch

Respuestas similares a “Python a Java Converter”

Preguntas similares a “Python a Java Converter”

Más respuestas relacionadas con “Python a Java Converter” en Java

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código