You are on page 1of 5

itor Problem Visualise View Plot

Solution.py Python v5.py v4.py

v1.py Initalcode.py
3.py v2.py

Chrome
X=int(input(("please provide any
1

input or 0 to terminate\n"))
2 while x
i f(x%2==0)
4 print(X, "is an even

number")
5 else:
6 print(x,
"
is an odd
number")
7 X int (input("please
=

provide any input or 0 to


terminate\n"))
8 if x == 0:

9 print("You entered 0,
program will exit now. ")
10 break
tor Problem Visualise View Plot

olution.py Python v5.py V4.py

3.py v2.py v1.py InitalCode.py

Chrome
my_dict = {'a' : 'one', 'b'
'two', 'c': 'third', d:
'fourth'}

print (my_dict.keys ())


for a in
my_dict:
print (my_dict.get (a))
tor Problem Visualise View Plot

olution.py Python v5.py V4.py

3.py v2.py v1.py InitalCode.py


Chrome
my_dict = t'a':'one', "b':'two

,'c':'three'}
print( '0riginal dictionary ='
, my_dict)
my_dictb']="changed
print("dictionary after change
,my_dict)
my_dict.clear(O
print('after clearing the
dictionary =,my_dict)
TS ESC101 2122

tor ProblemVisualise View Plot

olution.py Python v5.py v4.py

3.py v2.py v1.py InitalCode.py


Chrome
num =

int(input("Enter a number
:\n")):
COunt = 1;

while(count<=10)
print(f"{count} X {num} =

count*num}");
Count=count+1;
print("done")
itor Problem Visualise View Plot

Solution.py Python v5.py v4.py


3.py v2.py v1.py InitalCode.py
Chrome
1 dict {1: 10, 2: 20, 3: 30, 4:
=

40, 5: 50, 6: 60}


X =5
3-if(x in dict):
print(" Key ='+str(x)+', is
present in the dictionary')
else:
printCKey ="+str(x)+' , is not
present in the dictionary')

You might also like