Predict the output:
wd1="Please"
wd2="Help"
wd3="Me in"
wd4="Biology, Tomorrow is Exam"
print(wd1,wd2,wd3,wd4,sep=" ")
Answers
Full cøde::
wd1 = "Please"
wd2 = "Help"
wd3 = "Me in"
wd4 = "Biology, Tomorrow is exam"
print(wd1, wd2, wd3, wd4, sep=" ")
Output::
Please Help Me in Biology, Tomorrow is exam
Reason::
==> Sep method is used. Sep stands for separator. It separates every declared variable with a space.
Hope This Helps You..♪
Predicting output - Python
Before we predict the output of the given Program, let's first know about that what is Python and what is programming.
Python
Python is a powerful high-level, object-oriented programming language. It was created by Guido van Rossum. It was launched on 1991. It can connect to the database system, it can also read and modify files. Python works on different platforms like, Raspberry Pi, Linux, Mac, Windows and many more platforms.
Programming
Programming means to create or develop a software which is called a program that contains the instructions to tell a computer what to do.
The Output
The output of the given Python program will be as follows:
Please Help Me in Biology, Tommorow is Exam
Here, the sep parameter is used in the given program, and after sep parameter one whitespace is also given so the output come in separate with space.
Do you know
The sep is a parameter in python, sep is the separator between any two things. End is the one that comes after the last thing has been printed.
For Example:
print(1,2,3,4,5,sep="&")
>>> 1&2&3&4&5
print(1,2,3,4,5,end="&")
>>> 1 2 3 4 5&
Now, I think I explained everything about sep and end in Python and also I predict the output. We use Python for web development, mobile application, video games, machine learning and AI.