+ 1

Search in python

For the fellowing code: I wanna the i variable to search into equal var for a number (int) In the fellowing script... It gives me like 6 time of number list PS: the input be like : 2x + 6 def function(): print ("here is some equalize:") print(''' 1- Equalize from the second level ''') equalize= input("chose your equalizer : ") if equalize== "1": equal= input("write it down : ") n=0 l= len(equal) for i in equal: number=[0,1,2,3,4,5,6,7,8,9] if i == number: print (i) else: print("exit") function()

15th Jul 2020, 3:28 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
13 Réponses
+ 4
Hard to understand. Please an example for input and output.
15th Jul 2020, 3:47 PM
Oma Falk
Oma Falk - avatar
0
It is like Input: 26x + 9 Output: 26 x + 9
15th Jul 2020, 4:13 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
What does replace function do?
15th Jul 2020, 4:18 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
Ah thanks ❤️❤️
15th Jul 2020, 4:24 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
Can u help me out in my script?
15th Jul 2020, 4:29 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
I need someone to help me i get no friend for rn
15th Jul 2020, 4:30 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
Well basically imma making an 2nd level equalize solver script
15th Jul 2020, 4:48 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
The user input like 2x^2+3x+7
15th Jul 2020, 4:48 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
I devide these into a list (2,x2,3,x1,7) lis[0]=a list[2]=b list[4]=c Delta=b**2-4(a*c)
15th Jul 2020, 4:50 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar
0
A solver ... I think u get it..
15th Jul 2020, 4:50 PM
Mohamed Amine Hammane
Mohamed Amine Hammane - avatar