+ 9
Where did go wrong?
Desperate help please https://code.sololearn.com/cMs0Ksh3SCe4/?ref=app
63 Respostas
+ 8
Pls stop posting duplicate answers... Is there seriously any logical difference if you change the variable name used in range?
+ 7
Guyz how do i use python with other cides
+ 6
if all(x[i] * x[i] == y[i] for i in range(len(x))):
print("true")
else:
print("false")
+ 6
Calvin Capstone A number which is not divisible by any other number other than 1 and itself.
+ 5
https://code.sololearn.com/cOU8s2z80Ji1/?ref=app
Works
Also you have posted two similar questions. Kindly delete one.
+ 5
Or else it won't know which number to check with whom. It's a list. You have to mention the number's position.
+ 4
https://code.sololearn.com/cBj1Qg0jYaqW/?ref=app
If you just wanna show true or false then this would be enough
+ 3
Change your code to something like this:
x = (1,2,3,4,5,6,7,8,9,10,11,12,13)
y = (1,4,9,16,25,36,49,64,81,100,121,144,169)
if x[1]*x[1] == y:
print("true")
else:
print("false")
And you will get an output
+ 3
Thx
+ 2
Hey Calvin Capstone did you want this?
https://code.sololearn.com/cGtcVdW9gQ8a/?ref=app
+ 2
I rewrote your code. Try it this way:
x = (1,2,3,4,5,6,7,8,9,10,11,12,13)
y = (1,4,9,16,25,36,49,64,81,100,121,144,169)
#if x*x == y:
# print("true")
#else:
# print("false")
for i in range(len(x)):
mylist=[]
if x[i] * x[i] == y[i]:
print("True")
else:
print("false")
+ 2
Btw Bartika you mean perfectly divisible
+ 2
https://code.sololearn.com/c0EHDtC6Q2qb/?ref=app
This wil help you.....
+ 2
You created tuples "x" and "y", and tuples like
strings can be multiplied by integers. This leads to a repetition of the original tuple.
Tuples cannot be multiplied by other tuples. Tuples cannot also be multiplied by floating point numbers, even if they are integers.
Example:
x=1,2,3
print(x*2) #1,2,3,1,2,3
+ 1
No number in "y" will ever be prime because all its elements are square numbers.
+ 1
Do this question as below:
x = (1,2,3,4,5,6,7,8,9,10,11,12,13)
y = (1,4,9,16,25,36,49,64,81,100,121,144,169)
for i in range(len(x)):
if x[i]*x[i] == y[i]:
print("true")
else:
print("false")
+ 1
2,3,5,7,11,13. etc want more
+ 1
Bartika ,Calvin Capstone ,Rithea Sreng
Every number is divisble by any number .there will always be a result
3÷5 =0.6
You see
😃😃
+ 1
No need to fight 😬😬
+ 1
Sorry