Siddhesh
Siddhesh
------------------------------------------------------------------------------------------------------------------------------------------
---
Some Important Codes Discussed in Lecture 1
#IPO cycle
#Input Process Output
#data
quo = x // y # quotient
rem = x % y # remainder
# print (quo)
# print (rem)
"""
#Type casting of data using int (), float () & str () function
x = "40"
y = "30"
print (x + y)
# int () converts a numeric string into an integer value
print (int (x) + int (y))
a = 50
b = 30
print (a + b)
# str () converts an integer value into a numeric string
print (str (a) + str (b))
num1 = "50.34"
num2 = "2.1"
print (num1 + num2)
#float () converts a string into decimal value
print (float (num1) + float (num2))
"""
"""
# tAKING USER INPUT FROM THE CONSOLE USING THE input () function
firstName = input ("Enter your first name: ")
lastName = input ("Enter your last name: ")
fullName = firstName + " " + lastName
print ("Your full name is " + fullName + ".")
"""
#Take two numbers as input from the user and add them
# input () function takes input as a string
Bakliwal Tutorials
------------------------------------------------------------------------------------------------------------------------------------------
---
num1 = int (input ("Enter the first number: "))
num2 = int (input ("Enter the second number: "))
sum = num1 + num2
print (sum)