You are on page 1of 1

ASSIGNMENT 1 29/03/23, 3:24 PM

In [40]: '''QUESTION 1'''#Write a Python code to code print "Welcome to Vityarthi" twice

'QUESTION 1'
Out[40]:

In [33]: print("Welcome to Vityarthi")


print("Welcome to Vityarthi")

a = 10
b = a

print("a =", a)
print("b =", b)

Welcome to Vityarthi
Welcome to Vityarthi
a = 10
b = 10

In [41]: '''QUESTION 2'''#Write a Python program that asks the user to input their name,

'QUESTION 2'
Out[41]:

In [37]: name = input("Enter your Name: ")


print("My name is:", name)

Enter your Name: samarth


My name is: samarth

In [42]: '''QUESTION 3'''#Write a Python program that asks the user to input two numbers

'QUESTION 3'
Out[42]:

In [43]: num1 = int(input("Enter first number: "))


num2 = int(input("Enter second number: "))
sum = num1 + num2
print("Sum:", sum)

Enter first number: 2


Enter second number: 2
Sum: 4

file:///Users/samarth/Downloads/ASSIGNMENT%201.html Page 1 of 1

You might also like