+ 3
Can someone help me out with type conversion please
16 Respostas
+ 3
Thank youuu
+ 3
Käī Just write it like so :
num1 = int(input('Enter a number'))
num2 = int(input('Enter another number'))
print(float(num1*12) + float(num2*6))
+ 2
In which language?
+ 2
+ 2
To make integer to string :
str(10) # '10'
To make string to integer :
int('10') # 10
To make int to float
float(10) # 10.0
+ 2
Hey I have another question
How do I do
Print(float(input("enter a number: "))) +
Float(input("enter another number:"))
+ 2
Thanks :))
+ 2
Srry to bother you again but I got a error
When I did this:
print(float(12*int("Enter a number: ")) + float(6*int("Enter another number: ")))
num1 = float(12*int('Enter a number:'))
num2 = float(6*int('Enter another number'))
print(num1 + num2)
+ 2
Did I do something wrong
+ 2
You could also do something like:
print(float(input('Enter a number:')) + float(input('Enter another number:')))
You just had to move ')' to the end.
+ 2
Hey it's me again I did it but I still got a error:
num1 = int(12('Enter a number:'))
num2 = int(6('Enter another number'))
str(12) # 12.0
str(6) # 6.0
print(float(num1*12) + float(num2*6))
Print(float(input("Enter a number: ")) +
float(float(input("Enter another number: ")))
+ 1
Here you go :))
num1 = float(input('Enter a number'))
num2 = float(input('Enter another number'))
print(num1 + num2)
+ 1
Hey I tried ur way but am still getting error
+ 1
I tried this
num1 = float(int * 12('Enter a number:'))
num2 = float(int * 6('Enter another number'))
print((num1 * 12) + (num2 * 6))
0
this app is so helpful ! XD
0
You can do this:
integer = int(input())
integer2 = int(input())
print(integer * integer2)