How to use if statement on python


An if statement is a conditional statement in python. its used thus:
if (condition):
      print(statement)
else:
     print(statement)

For example on python 3 and above:
print('please insert a number')
a=int(input(''))
print('please insert another number')
b=int(input(''))

if (a>b):
    print(a,' is larger')
else:
    print(b,' is larger')

For example on python 2.7:
#!/usr/bin/python
print 'please insert a number'
a=input('')
print 'please insert another number'
b=input('')

if (a>b):
    print(a,' is larger')
else:
    print(b,' is larger')

Please leave your comment if you have any problem.


How to Add,Subtract,Divide and Multiply on Java

Given below is the code of java program that adds,subtracts, multiplies and divides two numbers which are entered by the user

import java.util.Scanner;
 
class Operators
{
   public static void main(String args[])
   {
      int a, b, c, d, e, f;
      System.out.println("Enter two integers to calculate their sum ");
      Scanner in = new Scanner(System.in);
      a = in.nextInt();
      b = in.nextInt();
      c = a + b;
      d = a - b;
      e = a * b;
      f = a/b;
    
      System.out.println("Sum of entered integers = "+c);
      System.out.println("Subtraction of entered integers = "+d);
      System.out.println("Multiplication of entered integers = "+e);
System.out.println("Division of entered integers = "+f);


   }
}

Any More Questions? Please leave your comments.

Data Types in python


Python supports four different numerical types:
int (signed integers)
long (long integers [can also be represented in octal and hexadecimal])
float (floating point real values)
complex (complex numbers)

Its used like this:
a=long(input())
a=int(input())
a=float(input())
a=complex(input())

How To add,subtract,multiply and divide on Python


To Type in python version 2.7:

#!/usr/bin/python

print"hello"
print"Please type in your first number"
a=input()
print"Please type in your second number"
b=input()

c= a + b
d=a - b
e=a * b
f=a / d


print"the addition is",c
print"the subtraction is",d
print"the multiplication is",e
print"the division is",f


To Type in python version 3.3 and above:

#!/usr/bin/python

print("hello")
print("Please type in your first number")
a=input()
print("Please type in your second number")
b=input()

c= a + b
d=a - b
e=a * b
f=a / d


print("the addition is",c)
print("the subtraction is",d)
print("the multiplication is",e)
print("the division is",f)

Who's Down: Google's new App

























No longer content to just being the ubiquitous source of information of all kinds for the typical college student, Google is now trying to be the platform that friends use to plan their next hangout. As 9To5Google reported earlier today, the company launched an app called ‘Who’s Down’ on the Apple App Store and Google Play Store this morning.Ostensibly a tool that allows friends interested in similar activities to quickly group and spend time on the event, the app is currently invite-only and is restricted to college students. It is worth noting, though, that ‘Who’s Down’ does not require users to sign up with an academic email address on a .edu domain, but does ask users to enter the name of an institution before joining the wait list. While it’s clear that there is no restriction to join the app which is good for growth, the targeting is also clear. Going after college students and teenagers with social apps isn’t exactly core to much of Google’s business, but it has been doing it with some small social efforts.
The design is characteristically Google, pleasant to use and with the company’s trademark blue-white design scheme. Once you move a slider that indicates that you are ‘down’ to meet other people, the app lets you enter the name of an activity that you are interested in doing, and also provides a list of what appear to be popular or intelligently guessed selections. Once more than a few other people indicate an interest in whatever you are interested in doing, the app will notify you and slide seamlessly into a chat room, where conversations disappear after 24 hours of last activity.
Barring Google’s powerful autocomplete feature being used to reduce the time it takes to type in activities of interest, Google’s design choices are hardly novel.
While on the face of it Google’s product appears to come with an intuitive design and excellent visual schemes, it is difficult to estimate the impact ‘Who’s Down’ will have on users without being able to use the app. Limiting the product to invite-only and branding it for college students will clearly be effective in gaining market share. It could be that ‘Who’s Down’ might help pull Google out of what can now only be called a social product rut.




Sprint is cutting back employee benefits and snacks as it tries to save $2.5 billion


Wireless carrier aims to slash fiscal 2016 expenses by as much as $2.5 billion.

Wireless carrier Sprint said on Sunday it aims to slash fiscal 2016 expenses by as much as $2.5 billion, through layoffs and a wide array of cost controls, as an essential part of its ongoing turnaround efforts.
“We are leaving no stone unturned and looking at all areas,” company spokesman Dave Tovar said in an interview. He declined to predict how many employees would be laid off, saying it was too early in the budgeting process.
The estimated cost savings for Sprint  S -1.88% , which has 31,000 employees, would be equivalent to about 10 percent of its current annual operating costs of $26 billion.
The ratio of the company’s capital expenditures to its sales is more than 20 percent, which Tovar said is higher than for other wireless carriers. “We are trying to get more in line with the industry average,” he said.
He said Sprint on Tuesday will provide more details about the job cuts and the company’s plans to bolster the quality, speed and capacity of its wireless network, when it reports fiscal second-quarter results.
Savings are also expected to come from cutting severance for laid off employees and temporarily eliminating raises.
In its first quarter ended June 30, the company posted a $20 million loss as revenue fell 8.7 percent to $8.03 billion, missing analysts’ estimates of $8.43 billion. But majority owner Softbank Corp eased investor concerns by saying it has no plans to sell its stake in Sprint.
Sprint has been burning through cash because of monthly leasing plans requiring wireless carriers to pay vendors for devices up front.