Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Lab Manual_Python_M5

Lab Manual_Python_M5

Published by Teamlease Edtech Ltd (Amita Chitroda), 2022-05-24 05:50:10

Description: Lab Manual_Python_M5

Search

Read the Text Version

Lab Manual

Python Programming

Objectives This manual has been designed to provide : Practical exercises for hands on practice Guidelines to complete the exercise Learning Outcome

Module 5

Exercise What will you do? • Use ‘while loop’ to display first 10 natural numbers

Guidelines What should you do? 1. Open Open your Jupyter Notebook. 2. Create a new Python project. 3. In the project select ‘new’ and click on the Python file. 4. Give a relevant name for the file. 5. Type the following code in the editor: # program 1: Print first 10 natural numbers print(\"First 10 natural numbers\") i=1 while i <= 10: print(i) i += 1 6. Right-click the editor and select Run '[file-name]' from the context menu. 7. Press Ctrl+Shift+F10.

Learning Outcome You will be able to use while loop in your projects in Python.

Thank You!


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook