is block scope available in python

Solutions on MaxInterview for is block scope available in python by the best coders in the world

showing results for - "is block scope available in python"
Melina
21 Jan 2019
1Leval_of_game = 2
2print(Leval_of_game)
3enemy = [" Skeliton", " Zombie", " Alean", " Robot", " Super Robots"]
4if Leval_of_game <= 3:
5    enemy_will_enter = enemy[0]
6    print(str(enemy_will_enter)+" Easy Enemy")
7elif Leval_of_game > 3 and Leval_of_game < 7:
8    many_enemy = enemy[0] + enemy[1] + enemy[2]
9    print(str(many_enemy)+" These enemeys are not that much strong but prepare your defence against them as thay can damage a lot together")
10else:
11    print(str(enemy)+" So these are your enemy but very strong they can distroy your base like a piece of stick prepare for the worse")
12#now if i call the enemy cereated in the if elif else block
13print(enemy_will_enter)
14#python allowing me to print enemy_will_enter unlike some of the other programming language
15#hence we can say thet python do not has block scope