• Register

Recent questions tagged int

0 votes
1 answer 1 view
Problem: How to I Solve this : can't multiply sequence by non-int of type 'list' HELP! I need help understanding this: can't multiply sequence by non-int of type 'list' Can someone please help solve this, I am new in python().
asked 15 hours ago Mashhoodch 9.9k points
0 votes
1 answer 1 view
Problem: How to I Solve this : python float('inf' HELP! I need help understanding this : python float('inf') Can someone please help solve this, I am new in python().
asked 16 hours ago Mashhoodch 9.9k points
0 votes
1 answer 1 view
Solution: How to fix this error: python __new__ vs __init__ HELP! I need help understanding this error: python __new__ vs __init__ Can someone please help fix this, I am new in python() : python __new__ vs __init__
asked 1 day ago Mashhoodch 9.9k points
0 votes
1 answer 7 views
Problem: Hi! I want to know if there is any way in C++ to convert an integer to a hexadecimal number? If yes, then please provide the demo code for better understanding. Commented code would be much appreciated. Thanks!
asked Feb 23 Code Learner 6.2k points
0 votes
1 answer 39 views
Problem: I tried to calculate poisson distribution in python as below: p = math.pow(3,idx) depart = math.exp(-3) * p depart = depart / math.factorial(idx) idx ranges from 0 But I got OverflowError: long int too large to convert to float I tried to convert depart to float but no results.
asked Feb 21 Mashhoodch 9.9k points
0 votes
1 answer 7 views
Problem: What is __init__.py for in a Python source directory?But just it contains an example, more information, and an explanation of namespace packages, the kind of packages without __init__.py.
asked Feb 21 Mashhoodch 9.9k points
0 votes
1 answer 7 views
Problem: I am trying to make skip-counting program. When I compile this code, the line while(counter2 = counter3){ shows up as a Incompatible Types error. The compiler says it found an "int" but it requires a "boolean". Please keep in mind that I am a newbie, so I have not learned booleans in my Java class yet.
asked Feb 20 Ali 5.4k points
0 votes
1 answer 11 views
Problem: how to add int to string in c++
asked Feb 19 kaash_kashi 1.2k points
0 votes
1 answer 7 views
Problem: I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine. I'm curious to know about the actual difference between the following 2 child classes. class Base(object): def __init__(self): print "Base ... ): def __init__(self): Base.__init__(self) class ChildB(Base): def __init__(self): super(ChildB, self).__init__() ChildA() ChildB()
asked Feb 18 Mashhoodch 9.9k points
0 votes
1 answer 10 views
Problem: here is we are going to discuss the problem how to convert “int” into “char”
asked Feb 15 jasimchaudary 640 points
0 votes
1 answer 21 views
Problem: I am typing to get a sale amount (by input) to be multiplied by a defined sales tax (0.08) and then have it print the total amount (sales tax times sale amount). I run into this error. Anyone know what could be wrong or have any suggestions?
asked Feb 14 Mashhoodch 9.9k points
0 votes
1 answer 11 views
Problem: int_max in c++
asked Feb 13 jasimchaudary 640 points
0 votes
1 answer 17 views
Problem: I am creating a program that reads a file and if the first line of the file is not blank, it reads the next four lines. Calculations are performed on those lines and then the next line is read. If that line is not empty it continues. However, I am getting this error: ... with base 10: ''. It is reading the first line but can't convert it to an integer. What can I do to fix this problem?
asked Jan 21 Mashhoodch 9.9k points
0 votes
1 answer 24 views
Problem: I am creating a program that reads a file and if the first line of the file is not blank, it reads the next four lines. Calculations are performed on those lines and then the next line is read. If that line is not empty it continues. However, I am getting this error: ... with base 10: ''. It is reading the first line but can't convert it to an integer. What can I do to fix this problem?
asked Jan 9 Mashhoodch 9.9k points
0 votes
1 answer 32 views
Problem: What is the purpose of __ init __? Is __ init __ necessary in Python? What does __ init __ return? Whenever object oriented programming is done in Python, we mostly come across __init__ method which we usually don’t fully understand. This article explains the main concept of __init__ but before understanding the __init__ some prerequisites are required.
asked Jan 6 Mashhoodch 9.9k points
0 votes
1 answer 186 views
Problem: I am running into this error for multiple variables, even handling missing values. For example: le = preprocessing.LabelEncoder() categorical = list(df.select_dtypes(include=['object']).columns.values) for cat in categorical: print(cat) df[cat].fillna('UNK', inplace=True) ... error results in: df['CRM do Médico'].isnull().sum() 0 Apart from nan values, what could be causing this error?
asked Dec 24, 2020 sasha 13.2k points
0 votes
1 answer 33 views
Problem: Hi there! I just recently learned loops in Python that are a bit complex and tricky. I got an assignment from my teacher in which I have to write a program that takes a number as input from the user and prints the multiplication table of that number. I tried ... that the user does not enter a negative number. I do not know what the problem is and how to resolve it. Any help? Thanks.
asked Dec 2, 2020 Code Learner 6.2k points
0 votes
1 answer 17 views
Problem: I want to convert a character to integer in C#. I have tried Convert.ToInt32(), int32.Parse(), (int)char, but nothing works as desired. I do not want to convert my character into string first. I want to convert my character directly into integer. How I can do that? Is there any mechanism for doing so?
asked Oct 22, 2020 Code Learner 6.2k points
0 votes
1 answer 190 views
Problem: I am a naïve to programming in C language. Please find below some relevant part of my code. I do not see any issues in my below code but still I keep on receiving below error: “Invalid operands to binary expression ('double' and 'double').” Please find ... is a double???? } printf ("%d\n", rem);          I need the modulo at any condition  but it is not working return 0;
asked Aug 13, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 132 views
I start programming recently and I love to do programming but every day I'm facing new problems. I wrote a java code where I can easily take two int input from a user and I'm able to print the smallest value. But I'm doing all things in the main method. I don't want to do ... smallest; if(a>b){ smallest = b; }else{ smallest = a; } System.out.println("Smallest is: "+smallest); } Here is my code.
asked May 3, 2020 samhaz 5k points