Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #EXERCISE 2.1
- >>> 5
- 5
- >>> x + 5
- >>> x + 1
- 6
- #EXERCISE 2.2
- name= raw_input("Please enter your Name: ");
- print "Hello "+name;
- #EXERCISE 2.3
- hours= raw_input("Enter Hours: ");
- rate= raw_input("Enter Rate: ");
- pay= round(hours*rate, 2);
- print "Pay: " + str(pay);
- #EXERCISE 2.4
- 1. width/2 = 8 int
- 2. width/2.0 = 8.5 float
- 3. height/3 = 4.0 float
- 4. 2+2*5= 11 int
- #EXERCISE 2.5
- cel= raw_input("Enter the temperature in Celsius: ");
- print "Temperature in Fahrenheit: " + str(((9*float(cel))/5)+32);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement