Can someone teach me this basic if or switch task? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone teach me this basic if or switch task?

variable flocking is either Yes or No variable otk is either “below ankle”, “over ankle”, “over the knee” variable upperMaterial is either “PU”, “Textile”, “Jelly”, “Others” I want to set up: Output #1: if flocking = Yes, AND otk = “below ankle” OR “over ankle” , AND upperMaterial is “Textile”, then print 6405.90.5040 if flocking = Yes, otk = “over the knee”, AND upperMaterial is “Textile”, then print 6402.90.3165 Output #2: if flocking = No, otk = “over ankle” OR “over the knee”, AND upperMaterial is “PU”, then print 6202.90.2020 ..... and similar rules with either this or that then print different outputs. There are more conditions in each scenarios.. Can someone guide me which is the way to achieve this? I seem to have difficulties trying to make different variable types satisfy the same time if they are true then to execute certain rules.. As I believe you can only do that if variants are the same type? Thanks a bunch!

26th Sep 2020, 10:04 AM
NAT SUN
NAT SUN - avatar
1 Answer
0
In which Language, pls tag the language.. And what you tried so far..? Did you completed the if else constructs lesson..? If not, just do, you can find solution... Try it.. and post your try if not stuck between then some one from community help... Ex : caee 1: if( flocking =="yes" && (otk == "over the knee" || otk== "over ankle") && upperMaterial =="Textile") prunt(6405.90.5040)
26th Sep 2020, 11:47 AM
Jayakrishna 🇮🇳