Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #2.2
- import sys
- name = input ("Enter your name : ")
- print ("Hello", name)
- #2.3
- import sys
- hours = input("Enter Hours : ")
- float_hours = float(hours)
- rate = input("Enter Rate : ")
- float_rate = float(rate)
- pay = float_hours * float_rate
- print ("Pay" , pay)
- #2.4
- import sys
- width = 17
- height = 12.0
- print ("Width // 2 = ", width//2)
- print ("Type is ", type(width//2))
- print ("Width / 2.0 = ", width/2.0)
- print ("Type is ", type(width/2.0))
- print ("Height / 3 = ", height/3)
- print ("Type is ", type(height/3))
- print ("1 + 2 * 5 = ", 1+2*5)
- print ("Type is ", type(1+2*5))
- #2.5
- import sys
- celcius = input("Enter temp in Celcius : ")
- f_celcius = float(celcius)
- fahrenheit = (f_celcius * 1.8) + 32
- f_fahrenheit = float(fahrenheit)
- print ("Temperature in Fahrenheit is : ", f_fahrenheit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement