×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Jayashree
has Published
93
Answers
What is the difference between ++i and i++ in c?
C
Server Side Programming
Programming
Jayashree
Published on 24-Apr-2018 20:11:56
In C, ++ and -- operators are called increment and decrement operators. They are unary operators needing only one operand. Hence ++ as well as -- operator can appear before or after the operand with same effect. That means both i++ and ++i will be equivalent.i=5; i++; printf("%d", i);and i=5 ++i; printf("%d", ...
Read More
Print a list in Python
Python
Server Side Programming
Programming
Jayashree
Published on 24-Apr-2018 19:45:39
List is a sequence of elements. Any element in the sequence is accessible by its position in sequence. The index starts with 0. Hence list[2] will return element at index 2, the third in the list i.e. 50.
Python: Cannot understand why the error - cannot concatenate 'str' and 'int' object ?
Python
Server Side Programming
Programming
Jayashree
Published on 24-Apr-2018 19:38:19
This can be corrected by putting n+1 in brackets i.e. (n+1)for num in range(5): print ("%d" % (num+1))Using %d casts the object following % to string. Since a string object can't be concatnated with a number (1 in this case) interpreter displays typeerror.
How to Find HCF or GCD using Python?
Python
Server Side Programming
Programming
Jayashree
Published on 07-Mar-2018 00:50:50
Highest Common Factor or Greatest Common Divisor of two or more integers is the largest positive integer that evenly divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4.x = int(input("Enter first number: ")) y = int(input("Enter second number: ")) if x ...
Read More
How to create Ordered dictionaries in Python?
Python
Server Side Programming
Programming
Jayashree
Published on 07-Mar-2018 00:40:06
An OrderedDict is a dictionary subclass that remembers the order in which its contents are added, It is defined in collections module of Python library. OrderDict remembers the order of addition of key-value pairs in a dictionary>>> from collections import OrderedDict >>> od=OrderedDict(d.items()) >>> od OrderedDict([('banana', 3), ('apple', 4), ('pear', ...
Read More
What are Ordered dictionaries in Python?
Python
Server Side Programming
Programming
Jayashree
Published on 07-Mar-2018 00:35:42
An OrderedDict is a dictionary subclass that remembers the order in which its contents are added, supporting the usual dict methods.If a new entry overwrites an existing entry, the original insertion position is left unchanged. Deleting an entry and reinserting it will move it to the end.>>> from collections import ...
Read More
Where are operators mapped to magic methods in Python?
Python
Server Side Programming
Programming
Jayashree
Published on 07-Mar-2018 00:10:08
You can find the operators mapped to different magic methods here − link
What is the difference between operator and method on Python set?
Python
Server Side Programming
Programming
Jayashree
Published on 07-Mar-2018 00:03:28
Python's set object represents built-in set class. Different set operations such as union, intersection, difference and symmetric difference can be performed either by calling corresponding methods or by using operators.Union by method>>> s1={1, 2, 3, 4, 5} >>> s2={4, 5, 6, 7, 8} >>> s1.union(s2) {1, 2, 3, 4, 5, ...
Read More
How will you explain Python Operator Overloading?
Python
Server Side Programming
Programming
Jayashree
Published on 06-Mar-2018 23:48:51
Every class in Python, whether built-in or user defined is inherited from object class. The object class has a number of properties whose name is preceded and followed by double underscores (__). Each of these properties is a wrapper around a method of same name. Such methods are called special ...
Read More
How to find the value closest to negative infinity in Python?
Python
Server Side Programming
Programming
Jayashree
Published on 06-Mar-2018 23:30:03
Although infinity doesn't have a concrete representation, the closest number to negative infinity is represented as return value of float() function with '-inf' as argument>>> a=float('-inf') >>> -inf
1
2
3
4
5
6
7
...
10
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout