# Recent questions tagged programming

0 votes
1 answer 6 views
I need to make a [console] program that gets the full names of five people, as well as their three grades to calculate their average. Instead of declaring variable by variable string nom1, nom2 //... int cal1, cal2 //... I want to make a for loop (or ... at the end because "the identifiers are not defined". Is it possible to achieve this, or is it something that not even magic can achieve?
0 votes
1 answer 13 views
Problem: sort method What method can be used to convert a list to a tuple? The sort method rearranges the elements of a list so they appear in ascending or descending order.
0 votes
1 answer 16 views
Problem: % How Percent sign(%) acts as a modulus operator in java programming language?Modulus operator is an operator that works on integers and yields the remainder when one number is divided by another. Thus x = A%B means that x will carry the value of the remainder when dividing A by B.
0 votes
1 answer 10 views
Problem: IS != operator is a comparison operator,?where to used in conditional expressions. Isreads, &ldquo;not equal&rdquo;. If the compared values are not equal to each other than the expression returns true. An example of a program that uses both the && and !=
0 votes
1 answer 6 views
Problem: Trimmed Mean a method of averaging that removes a small percentage of the largest and smallest values before calculating the mean. The Trimmed Mean can be calculated using the following formula. Anyone explain in detail.
0 votes
1 answer 8 views
I have noticed comments about how the use of except: pass is discouraged. Why is this bad? Sometimes I just don't care what the errors are and I want to just continue with the code. try: something except: pass Why is using an except: pass block bad? What makes it bad? Is it the fact that I pass on an error or that I except any error?
0 votes
1 answer 9 views
Problem: I want to know the difference between | and ||, & and && in C++. What is the difference if I use the &lsquo;if&rsquo; condition as if(a == b || a == c) or if(a == b | a == c)? Please elaborate. Thanks
0 votes
1 answer 6 views
Problem: I want to know what does static mean in C# and why do we declare methods and variables as static in C#?
0 votes
1 answer 13 views
Problem: Hi there! I am working with a textbox in C# and I want to define multiple restrictions on this textbox through if statement. If I use nested ifs, my program becomes bulky. I want to keep my program as compact as possible. Attaching my code below. Please guide how I ... is " + Convert.ToInt32(nameTextBox.Text); } } I want to check if the text in the textbox is a number from 1 &ndash; 10.
0 votes
1 answer 14 views
Problem: I am confused about operators in Java and unable to understand the use of *= operator. Kindly explain the working of *= in detail.
0 votes
1 answer 8 views
Problem: Hi there, I am new to the world of programming. I have a question that what does &ldquo;/n&rdquo; mean and what is its purpose?
0 votes
1 answer 3 views
I know that the HTML is a language but can it be considered in the programming language? Can I write HTML as my programming language under my professional resume?
0 votes
1 answer 24 views
Question: In what domains C# can be used?
0 votes
1 answer 14 views
Which one should I use in C# , Decimal or Double?
0 votes
1 answer 16 views
Problem: I am very naive to Javascript. I am trying to clear my doubt related to Javascript. &ldquo;Why javascript is called as lightweight programming language?&rdquo; I am extremely confused about my above doubt. I have already gone through many available sites to find the answer but I am unable to get any proper answer. Please guide me in clearing my doubt related to Javascript.
0 votes
1 answer 12 views
0 votes
1 answer 65 views
In C-check if char is in char array I am trying to check if a character belongs to a list/array of invalid characters. It comes from a Python background.) for c in string:      if c in invalid_characters:          #do stuff, etc How can I do it with a regular C character array?
0 votes
1 answer 17 views
0 votes
1 answer 10 views
I want to loop in C so that when the program asks for an integer and the user types a character with no digits, the program asks for an integer again. I just found the following code. but i dont understand what it means scanf ("% * [^ n]% * c"). What does ^ n mean? What do the * before ^ ... ) {     grade = 'D';   }   printf ("Your final score is:% 2.2f ->% c n n", meanValue, note);   return 0; }
0 votes
1 answer 13 views
char word [] = "Hello World"; char vowels [] = ""; int i; for (i = 0; i <strlen (word); i ++) {      if (word [i] == 'a' || word [i] == 'e' || word [i] == 'i' || word [i] == 'or' || word [i] == 'u') {          // here would be the line of code I need      } } The vowel result would have to be "oauo"