0% found this document useful (0 votes)
2 views1 page

Python Practical1

The document outlines a Python programming lab focused on basic practices. It includes instructions for running code in an interactive interpreter and a script, as well as examples of raising and correcting an indentation error. The examples demonstrate user input and proper formatting in Python syntax.

Uploaded by

aamirgour446
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python Practical1

The document outlines a Python programming lab focused on basic practices. It includes instructions for running code in an interactive interpreter and a script, as well as examples of raising and correcting an indentation error. The examples demonstrate user input and proper formatting in Python syntax.

Uploaded by

aamirgour446
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON PROGRAMMING LAB (CSP-005)

Practical 1 – Basics

a) Running instructions in interactive interpreter and a Python script.

name = input("Enter your name: ")


print("Hello", name)

Output:

b) Write a program to purposefully raise an indentation error and correct it.

Error:
if True:
print("Error")
Output:

Correct:
if True:
print("Correct")

Output:

You might also like