X Tutup
# -*- coding: utf-8 -*- """ Created on Thu Aug 5 03:13:49 2021 @author: mjach """ ''' How to take input from the user ''' # fruit = input('What fruit do you like?: ') # print('I like ', fruit) # #input always take as a string # #if you put neumaric number you have to converted it to int format # first_number = int(input('Enter a first number:')) # second_number = int(input('Enter a second number:')) # total = first_number + second_number # print('Total is:', total) #what if, if you do not converted it to int format first_number = input('Enter a first number:') second_number = input('Enter a second number:') total = first_number + second_number print('Total is:', total)
X Tutup