<h2>A line of code that begins with the "while" needs to end with <u>":"</u> symbol</h2>
Explanation:
In python, the while loop statement has ":" at the end of the line.
<u>Syntax:</u>
while expression:
code(s) or statement(s)
<u>Example:</u>
cnt = 0
while (cnt < 5):
print 'cnt:', cnt
cnt = cnt + 1
Like other programming languages, while loop works in the same way except that in python it comes alone with "else" statement. When the condition is false, "else" statement gets executed.
<u>Example:</u>
#!/usr/bin/python
cnt = 0
while cnt < 5:
print cnt, " is less than 5"
cnt = cnt + 1
else:
print cnt, " is not less than 5"
Answer:
Explanation:
Operation Address Hit? Read Value
Read 0x834 No Unknown
Write 0x836 Yes (not applicable)
Read 0xFFD Yes CO
What do you mean did you refresh the page
Answer:
int result=max(population1,population2);
printf("%d",result);
Explanation:
in above result variable holds the largest value of two variables population1 and population2.Printf displays that largest value.
int result=max(population1,population2);
in above expression , right hand side we are calling max function and on the left hand side we are saving the return value of the function in result variable