![]() Inside the while loop: You will print out the sentence 'correcting.'. Step 1:- Select a random number & store in variable 'op1' in while loop step 2:- Select a random number & store in variable 'p1' in while loop step 3:- if p1> op1 then print 'a' step 4:- if p1< op1 then print 'b' keep doing step 3 & 4 & if any of the 3 or 4 is achieved go on step 1. Then you will write a while loop that keeps running as long as the offset is not equal to 0. ![]() ![]() Python Dictionaries Access Items Change Items Add Items Remove Items Loop Dictionaries Copy Dictionaries Nested Dictionaries Dictionary Methods Dictionary Exercise Python If.Else Python While Loops Python For Loops Python Functions Python Lambda Python Arrays Python Classes/Objects Python Inheritance Python Iterators Python Polymorphism Python Scope Python Modules Python Dates Python Math Python JSON Python RegEx Python PIP Python Try. Python supports the usual logical conditions from mathematics: Equals: a b. Example In the below example, you will create the variable offset with an initial value of 8.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |