Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Need help po guys sa Python

Status
Not open for further replies.

God love us

Amateur
Advanced Member
Messages
134
Reaction score
0
Points
26
guys paano po gagawin para mag karoon ng decimal ito

Code:
#Lab 2
#Challenge 1
num1= (input ('Enter first number '))
num2= (input ('Enter second number '))

num1, num2 = num2, num1

print ('The value of the first number after swapping is  ' + num1)
print ('The value of the first number after swapping is  ' + num2)

example

The value of the first number after swapping is 5.0
The value of the first number after swapping is 10.0

salamat in advance
 
print ('The value of the first number after swapping is ' + num1 + .0)
print ('The value of the first number after swapping is ' + num2 + .0)
 
"%.2f" % num1
"%.2f" % num2
 
Last edited:
Status
Not open for further replies.
Back
Top Bottom