Answers for "block scope"

0

block scope

Leval_of_game = 2
print(Leval_of_game)
enemy = [" Skeliton", " Zombie", " Alean", " Robot", " Super Robots"]
if Leval_of_game <= 3:
    enemy_will_enter = enemy[0]
    print(str(enemy_will_enter)+" Easy Enemy")
elif Leval_of_game > 3 and Leval_of_game < 7:
    many_enemy = enemy[0] + enemy[1] + enemy[2]
    print(str(many_enemy)+" These enemeys are not that much strong but prepare your defence against them as thay can damage a lot together")
else:
    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")
#now if i call the enemy cereated in the if elif else block
print(enemy_will_enter)
#python allowing me to print enemy_will_enter unlike some of the other programming language
#hence we can say thet python do not has block scope
Posted by: Guest on August-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language