Robotics & Artificial Intelligence
Create your portfolio, which should include your name, parent's name, class and address using strings in Python.
Python String Manipulation
3 Likes
Answer
name = "Virat Kohli"
father_name = "Prem Kohli"
mother_name = "Saroj Kohli"
class_name = "Class 10"
address = "New Delhi, India"
print("----- PORTFOLIO -----")
print("Name :", name)
print("Father's Name:", father_name)
print("Mother's Name:", mother_name)
print("Class :", class_name)
print("Address :", address)
Output
----- PORTFOLIO -----
Name : Virat Kohli
Father's Name: Prem Kohli
Mother's Name: Saroj Kohli
Class : Class 10
Address : New Delhi, India
Answered By
3 Likes
Related Questions
Write the output of the print command in the given table.
a = "Python World"Print statement Output print(a[0])print(a[-2])print(a[5])print(a[7])print(a[-9])print(a[10])What would be the output of following program?
print("Hello\nWorld!") print("Python\tProgramming")What would be the output of following program?
str2 = "My classmate is Aayan" if str2.endswith("Aayan"): print("Aayan is studying in class X") else: print("Aayan is not the student of class X")What should be the output of following program?
information = "My favorite subject is Python, I want to develop an AI application in Python" val = information.find('T') print(val) if val > 1: print("Python is a good programming language for AI applications ") else: print("My favorite subject is Python")