Questions tagged [simplification]

249 questions
-1
votes
2 answers

SAS simplify the contents of a variable

In SAS, I've a variable V containing the following value V=1996199619961996200120012001 I'ld like to create these 2 variables V1=19962001 (= different modalities) V2=42 (= the first modality appears 4 times and the second one appears 2 times) Any…
user2129506
  • 131
  • 8
-1
votes
1 answer

Python tkinter simplification

Is there any way I can write this, with a function or anything similar, so that it doesn't take up so much room? self.birth_date_ent = Entry(self) self.birth_date_ent.grid(row = 0, column = 1, sticky = W) self.birth_date_ent.insert(0,…
FlxD
  • 1
-2
votes
1 answer

How to simplify this code in Javascript via function chaining?

I would to know how to simplify theses function calls by chaining them. Is there a way to chain forEach, push, destructuring array and map. let selectorsForLoader = ['a', 'b']; let loadingElements = []; selectorsForLoader.forEach(selector =>…
Dotista
  • 404
  • 3
  • 12
-2
votes
1 answer

Why are the symbols of some constants eliminated in certain equations when we assign them the value 1?

For example, in the expression of the gamma factor in special relativity we make c = 1 because the units are not important, but when c is suppressed from the equation Gamma = 1 / SQRT (1 - (v / c) ^ 2) it remains: Gamma = 1 / SQRT (1 - v ^ 2) which…
-2
votes
2 answers

Optimize multiple if else statements in C

Code: #include int main(void) { int coins = 0; float cash_owed = 0; printf("Cash owed: "); scanf("%f" , &cash_owed); while(cash_owed > 0) { if(cash_owed >= 0.25) …
lookabove
  • 19
  • 1
-2
votes
1 answer

Simplifying code of complex list comprehension in Python

Assume a list of dictionaries (lst_of_dcts) in Python. Further, assume that I wish to modify (e.g., encode in ASCII) each value v of the key-value pairs k:v in each of the dictionaries dcts. In order to do so, I am using list comprehension, but the…
Michael Gruenstaeudl
  • 1,609
  • 1
  • 17
  • 31
-2
votes
1 answer

Boolean Algebraic Simplification

So, I have several of these questions. I just need help on one of them. Also would you provide the explanation to how you got your answer. I would be very much appreciated Show the algebraic simplification of ab(!c) + !ab(!c) to b(!c).
-3
votes
2 answers

How to simplify this factorial expression?

I always have trouble with factorials. Can someone walk me through simplifying this expression? (x+1)! - 1 + (x+1)(x+1)! I'm trying to get it to equal to (x+2)! - 1.
heyyo
  • 139
  • 2
  • 13
-4
votes
1 answer

what is Boolean x'.y+x.y' equal to

i am stuck with a boolean expression help me solve what x.y'+x'.y =? i have exam today and i don't know how do solve this type. And in addition can someone recreate the boolean laws that involve two element instead of one for me? Thank you
ninjax kid
  • 1
  • 1
  • 1
  • 1
1 2 3
16
17