• Register

Recent questions tagged program

0 votes
1 answer 41 views
Problem: Hello guys, While solving basic condition problems in python I am trying to implement the below logic but don't know python is throwing error, the invalid syntax for no reason, below is the code. I have tried various things to fix this but still can able to solve ... "main.py", line 5 for y in fruits: ^ IndentationError: expected an indented block This is the error I am getting in this.
asked Jun 28 Gavin 15.3k points
1 vote
1 answer 12 views
Problem: Hello kodlogs, I have been working with the python program and wanted to calculate the max value from list is there any function available to do this or I have to go with the comparison basis than it would take a long time to do a simple searching to the maximum element is there any short cut available in the python to achieve this?
asked Jun 28 Gavin 15.3k points
0 votes
1 answer 178 views
Problem: Hello guys, I am running this code in visual code but dont know why the error ic coming can you please check the error of if__name__ ==__main__invalid syntax. def main(): generateRandomNumbers() def generateRandomNumbers(): print ('Test') si_ze = 0 nameLength=0 ... == "__main__" main() Getting Syntax error if name == main ^ SyntaxError: invalid syntax Process finished with exit code 1
asked Jun 9 Gavin 15.3k points
1 vote
1 answer 29 views
Problem: Hello guys, While solving basic condition problem in python I am trying to implement the below logic but don't know python is throwing error, the invalid syntax for no reason,below is the code. day = int(input("Enter the day of week:")) vacation = (input("Enter is vacation? [True| ... 00") else: if day == 0 or day == 6: print("Alarm is off") elif: print("10:00") Dont know what is wrong.
asked Jun 7 Gavin 15.3k points
1 vote
1 answer 30 views
Problem: In Python while practising the few question from c language i tried to implement the few of the program but most of the time it come up with the syntax error or the intend error can you help what actually i am missing the syntax error in python every time i execute it.
asked Jun 3 Gavin 15.3k points
0 votes
2 answers 47 views
I'm new in java programming, I know how to find out the largest or smallest number from an array. But I'm facing problem when I'm trying to find out smallest staring in 3 string. Please help me write a method min that has three string parameters and returns the smallest.
asked May 2 samhaz 5k points
1 vote
1 answer 75 views
Problem: Can anyone provide me an expression that executes the loop body as long as the user enters a non-negative number. Thanks in advance.
asked Apr 9 LizzyM 6.1k points
0 votes
1 answer 46 views
Problem: What best defines a programming language?
asked Mar 9 ArifulIslam 5.7k points
0 votes
1 answer 211 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? What makes system changes to repair design flaws, coding errors, or implementation issues? A. Corrective maintenance B. Preventative maintenance C. Pilot implementation D. Phased implementation
asked Feb 24 maddi86 5.4k points
0 votes
1 answer 52 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? Write an expression that whose value is the fifth character of the String name?
asked Feb 24 maddi86 5.4k points
0 votes
1 answer 40 views
Problem: I am new in programming and my logic is not good, can anyone give the right solution? How to declare a character variable named c?
asked Feb 22 maddi86 5.4k points
0 votes
1 answer 276 views
Problem: I am new and my logic is not so strong can any one give me right solution? What does the following statement mean? num1, num2 = get_num() a. The function get_num() is expected to return a value each for num1 and num2. b. The function get_num() is expected to return a value and assign it to num1 and num2. c. Statement will cause a syntax error. d. Statement will cause a run-time error.
asked Feb 22 maddi86 5.4k points
0 votes
1 answer 107 views
Problem: I am new in programming and my logic is not good, can anyone give the right solution? Which of the following could not be a linear programming problem constraint? A.1A + 2B ≤ 3 B.1A + 2B ≥ 3 C.1A + 2B = 3 D.1A + 2B + 3C + 4D ≤ 5 E.1A + 2B
asked Feb 22 maddi86 5.4k points
0 votes
1 answer 145 views
Problem: I am new and learning, I need help, can anyone help by filling in the blanks? The ability for a protocol or program to determine that something went wrong is known as ________?
asked Feb 21 maddi86 5.4k points
0 votes
2 answers 82 views
Problem: I am new, I need help, can anyone help? This is a special value that marks the end of a list of values?
asked Feb 21 maddi86 5.4k points
0 votes
1 answer 39 views
Problem: I am trying to run a query, can any one guide me what does this query means? What does the following statement do? double[] array1 = new double[10]; a. Declares array1 to be a reference to an array of double values b. Creates an instance of an array of 10 double values c. Will allow valid subscripts in the range of 0 - 9 d. All of these
asked Feb 21 maddi86 5.4k points
0 votes
1 answer 97 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? Ideally, an entity identifier is composed of _____ attribute(s)? A) one B) two C) three D) six
asked Feb 21 maddi86 5.4k points
0 votes
1 answer 26 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? In most programming languages, before you can use any variable, you must include a ____ for it? a. declaration b. definition c. header d. proclamation
asked Feb 19 maddi86 5.4k points
0 votes
2 answers 51 views
Problem: I am new, I need help, can anyone help me by filling in the blanks? The ____ function determines the lowest number in a range?
asked Feb 19 maddi86 5.4k points
0 votes
2 answers 44 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? With its encoding java can work with characters?
asked Feb 19 maddi86 5.4k points