Skip to content

bxlxji/Projects-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Projects-in-Python

Hey! I'm Balaji! and this is a Simple Game Program written in "Python" that tries to recreate a programming game from the 80s on the "BBC Micro" System.

This is a small flashback into the lives of the kids in the 80s and how programming was made fun for them in the coding language "BASIC". This was a game that came in a magazine published by "Usborne Computer Coding Book". The BBC Micro was a staple in British Schools in the 80s and this inspired a lot of kids to get interested in Programming!

These Books consisted of many "Coding Games". They seem very simple now but for the 80s, this was a blast! Hope you had some fun with it too!

THIS IS A PROGRAM WRITTEN ONLY FOR EDUCATIONAL PURPOSES, NO COPYRIGHT INFRINGEMENT INTENDED.

1)Vital Message

image

image

image

import os
import random
import string
import time

os.system('cls||clear')

print('VITAL MESSAGE'
      '\n')

while True:
    D = int(input('HOW DIFFICULT? (4-10)'))
    if D>=4 and D<=10:
        break

M = ''

for i in range(D):
    M += random.choice(string.ascii_uppercase)

print('SEND THIS MESSAGE:'
      '\n'
      '\n',M)

time.sleep(0.3*D)

os.system('cls||clear')

N = input('')

if N == M:
    print('MESSAGE CORRECT!'
          '\n''THE WAR IS OVER')
else:
    print('YOU GOT IT WRONG''\n'
          'YOU SHOULD HAVE SENT:''\n',M)

Program outputs

Screenshot 2024-05-17 153159

Screenshot 2024-05-17 153229

Screenshot 2024-05-17 153419

Screenshot 2024-05-17 153441

2)Shootout

image

image

from time import sleep
from random import randint
import msvcrt
import os

os.system('cls||clear')

print('COWBOY SHOOTOUT'
      '\n''YOU ARE BACK TO BACK'
      '\n''TAKE 10 PACES...')

W = 1
while W <= 10:
    sleep(0.2)
    print(W,'...')
    W += 1

S = randint(1,5)
sleep(S*0.2)
print('HE DRAWS...')

x = 0
while x < S:
    if msvcrt.kbhit() == True:
        print('BUT YOU SHOOT FIRST'
              '\n''YOU KILLED HIM')
        exit()
    else:
        sleep(0.2)
        x = x+1

print('AND SHOOTS'
      '\n''YOU ARE DEAD')

Program outputs

Screenshot 2024-05-17 152856

Screenshot 2024-05-17 152916

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages