# loop control statement #countinue statement:it returns the control #to the beginning of the loop prints all letters #except 'g' and 'p' i = 0 a = 'codingmaayokp' while i < len(a): if a[i] == 'g' or a [i] == 'sp': i += 1 continue print ('current letter:', a[i]) i += 1
Output :-
current letter: c current letter: o current letter: d current letter: i current letter: n current letter: m current letter: a current letter: a current letter: y current letter: o current letter: k current letter: p
Study Makes Hero Tech
Are you Happy?
8 months ago | [YT] | 0
View 6 replies
Study Makes Hero Tech
What are the supported data types in Python?
11 months ago | [YT] | 1
View 0 replies
Study Makes Hero Tech
What is the output of print tuple[0] if tuple = ( 'abcd', 786 , 2.23,
'john', 70.2 )?
11 months ago | [YT] | 0
View 0 replies
Study Makes Hero Tech
What is the output of print tuple if tuple = ( 'abcd', 786 , 2.23,
'john', 70.2 )?
11 months ago | [YT] | 0
View 0 replies
Study Makes Hero Tech
#include<stdio.h>
int func(int n)
{
static int i=1;
if(n>=5){
return n;
}
n=n+i;
i++;
return func(n);
}
int main()
{
int r=func(2);
printf("%d",r);
return 0;
}
What is the output of the program?
11 months ago | [YT] | 0
View 0 replies
Study Makes Hero Tech
6 รท 2 (1 + 2) =
11 months ago | [YT] | 1
View 2 replies
Study Makes Hero Tech
12 Most Common git Commands YOU MUST KNOW
- init
- clone
- status
- add
- commit
- push
- pull
- branch
- checkout / switch
- merge
- diff
- log
1 year ago | [YT] | 2
View 0 replies
Study Makes Hero Tech
# loop control statement
#countinue statement:it returns the control
#to the beginning of the loop prints all letters
#except 'g' and 'p'
i = 0
a = 'codingmaayokp'
while i < len(a):
if a[i] == 'g' or a [i] == 'sp':
i += 1
continue
print ('current letter:', a[i])
i += 1
Output :-
current letter: c
current letter: o
current letter: d
current letter: i
current letter: n
current letter: m
current letter: a
current letter: a
current letter: y
current letter: o
current letter: k
current letter: p
#python #pythonprogramming #pythonlearning #pythondeveloper #pythonprogrammer #pythoncode #pythonstatus
1 year ago | [YT] | 1
View 0 replies
Study Makes Hero Tech
Extension of the python file?
1 year ago | [YT] | 0
View 0 replies
Study Makes Hero Tech
What developed the python language?
1 year ago | [YT] | 0
View 0 replies
Load more