SIMPLE PROGRAM IN PYTHON

GOCOURSE


Write a Simple Program

 1.Write a program to sum any three integers.

Program:


  a=10
  b=20
  c=30
  d=a+b+c
  print("sum of a,b and c:",d)


Output:


  sum of a,b and c:60


2. Write a program Add three integer to using input statement

Program:


  A=int(input("Enter A value"))
  B=int(input("Enter B value"))
  C=int(input("Enter C value"))
  D=A+B+C
  print("sum of A,B and C:",D)


Output:


  Enter A value =10
  Enter B value =20
  Enter C value =30
  sum of A,B and C:60

 

3.Write program to print a String word "welcome to Gocourse" and also using input. statement

Program: 


  intro=str(input("Enter given word: "))
  print(intro)


Output:


  Enter given word: welcome to Gocourse
  welcome to Gocourse




More topic in Python

Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send