• Stars
    star
    1
  • Language
    Python
  • Created almost 4 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

You are creating a shooting game! The game has two types of enemies, aliens and monsters. You shoot the aliens using your laser, and monsters using your gun. Each hit decreases the lives of the enemies by 1. The given code declares a generic Enemy class, as well as the Alien and Monster classes, with their corresponding lives count. It also defines the hit() method for the Enemy class. You need to do the following to complete the program: 1. Inherit the Alien and Monster classes from the Enemy class. 2. Complete the while loop that continuously takes the weapon of choice from user input and call the corresponding object's hit() method.

More Repositories

1

class-react

react page with class
JavaScript
1
star
2

code2plus

finally face of code2
JavaScript
1
star
3

first-react-code

my first react code
JavaScript
1
star
4

your_lifetime

calculate your lifetime
JavaScript
1
star
5

little

my little project
JavaScript
1
star
6

Spelling-Backwards

Given a string as input, use recursion to output each letter of the strings in reverse order, on a new line.
Python
1
star
7

give-me-7

give me seven number. I will show it
C
1
star
8

startup-proj

startup project is an idea about remote working in Iran
JavaScript
1
star
9

code2

my second project during learning bootstrap 4
JavaScript
1
star
10

fuckingCode

C
1
star
11

twoweek

my first project after two week
HTML
1
star
12

factorial

...
1
star
13

leaderboard

You need to make a program for a leaderboard. The program needs to output the numbers 1 to 9, each on a separate line, followed by a dot: 1. 2. 3. ...
Python
1
star
14

personal-site

JavaScript
1
star
15

n-number

1+2+3+4+...+n=?
HTML
1
star
16

theme-switcher

problem theme switcher inquera site
JavaScript
1
star
17

stars

satrs triangle
1
star
18

Search-Engine

You’re working on a search engine. Watch your back Google! The given code takes a text and a word as input and passes them to a function called search(). The search() function should return "Word found" if the word is present in the text, or "Word not found", if it’s not.
Python
1
star
19

tinycal

a little calculator
JavaScript
1
star
20

Title-Encoder

You are given a file named "books.txt" with book titles, each on a separate line. To encode the book titles you need to take the first letters of each word in the title and combine them. For example, for the book title "Game of Thrones" the encoded version should be "GoT". Complete the program to read the book title from the file and output the encoded versions, each on a new line.
Python
1
star
21

Letter-Frequency

You are making a program to analyze text. Take the text as the first input and a letter as the second input, and output the frequency of that letter in the text as a whole percentage.
Python
1
star
22

flight-time

You need to calculate the flight time of an upcoming trip. You are flying from LA to Sydney, covering a distance of 7425 miles, the plane flies at an average speed of 550 miles an hour. Calculate and output the total flight time in hours.
Python
1
star
23

tip-calculator

When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right tip amount every time? Not you that’s for sure! You’re making a program to calculate tips and save some time. Your program needs to take the bill amount as input and output the tip as a float.
Python
1
star
24

BMI-calculator

Tracking your BMI is a useful way of checking if you’re maintaining a healthy weight. It’s calculated using a person's weight and height, using this formula: weight / height² The resulting number indicates one of the following categories: Underweight = less than 18.5 Normal = more or equal to 18.5 and less than 25 Overweight = more or equal to 25 and less than 30 Obesity = 30 or more Let’s make finding out your BMI quicker and easier, by creating a program that takes a person's weight and height as input and outputs the corresponding BMI category.
Python
1
star
25

Registration-System

You are making a registration form for a website. The form has a name field, which should be more than 3 characters long. Any name that has less than 4 characters is invalid. Complete the code to take the name as input, and raise an exception if the name is invalid, outputting "Invalid Name". Output "Account Created" if the name is valid.
Python
1
star
26

Ticket-Office

You are analyzing sales data from a ticket office. The ticket for an adult is $20, while the ticket for a child under 18 is $5. The data you are given is in a dictionary format, where the keys are the sold ticket numbers, and the values are the customer ages. For example, "123-08": 24 means that the ticket was bought a 24 year old. Your goal is to calculate how much more money the office would make if it would change the ticket discount age to the given input. So, your program needs to take an integer as input and output the percentage of revenue growth, if the discount was given to people under that age. For example, if the office made $15000 with the original discount age, and would make $18000 with 14 as the discount age, then the growth would be ((18000-15000)/15000)*100 = 20%
Python
1
star
27

Balanced-Parentheses

Parentheses are balanced, if all opening parentheses have their corresponding closing parentheses. Given an expression as input, we need to find out whether the parentheses are balanced or not. For example, "(x+y)*(z-2*(6))" is balanced, while "7-(3(2*9))4) (1" is not balanced. The problem can be solved using a stack. Push each opening parenthesis to the stack and pop the last inserted opening parenthesis whenever a closing parenthesis is encountered. If the closing bracket does not correspond to the opening bracket, then stop and say that the brackets are not balanced. Also, after checking all the parentheses, we need to check the stack to be empty -- if it's not empty, then the parentheses are not balanced. Implement the balanced() function to return True if the parentheses in the given expression are balanced, and False if not.
Python
1
star
28

Average-Word-Length

Given a sentence as input, calculate and output the average word length of that sentence. To calculate the average word length, you need to divide the sum of all word lengths by the number of words in the sentence.
Python
1
star
29

Sum-of-Consecutive-Numbers

No one likes homework, but your math teacher has given you an assignment to find the sum of the first N numbers. Let’s save some time by creating a program to do the calculation for you! Take a number N as input and output the sum of all numbers from 1 to N (including N).
Python
1
star
30

letter-counter

Given a string as input, you need to output how many times each letter appears in the string. You decide to store the data in a dictionary, with the letters as the keys, and the corresponding counts as the values. Create a program to take a string as input and output a dictionary, which represents the letter count.
Python
1
star