

















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Python basics control structures and loop statements if-else if-else statement: The if-elif-else statement is used to execute one of multiple blocks of code based on multiple conditions.
Typology: Lecture notes
1 / 57
This page cannot be seen from the preview
Don't miss anything!
Python….
Python….Interactive mode In interactive mode, you type Python programs and the interpreter displays the result:
1 + 1 2 The shell prompt, >>>, is the prompt the interpreter uses to indicate that it is ready. If you type 1 + 1, the interpreter replies 2.
Python…. Script Mode
File name : first.py print(4+3) print(4-3) print(4>3) print( "hello World" )
Input Processing Output Amount in hand, N Price of one chocolate, C Number of wrappers for a free chocolate, M Number of Chocolates P = Quotient of N / C Free chocolate F = Quotient of P/M Total number of chocolates got by Bob
Rules for Identifier