GoConqr has a new look! Let us know what you think.

Module 17 of 18 · Media

Practice Makes Perfect

Kostas Diakogiannis

Practice Makes Perfect

D5 - Practice Makes Perfect

 

1. Write a program that accepts a number, and print to the console if its negative, positive or 0.

2. Write a program that reads a number and return it's opposite. If 5 returns -5. If -12 returns 12 etc. Do it without using the native Math object, only with if statements (or even without).

3. Write a program that accepts 5 inputs as numbers. Calculate the sum and the average of them.

4. Write a program that accepts 3 numbers and prints the biggest of them.

5. Store a year in a variable and check if this year is a leap year (366 days) given that leap years  are 2016, 2012, 2008, 2004, 2000 etc. Print to the console 'yes' or 'no' accordingly.

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?