Skip to content

Latest commit

 

History

History
65 lines (35 loc) · 1.89 KB

challenge.md

File metadata and controls

65 lines (35 loc) · 1.89 KB

Abd 10/26/2020

Coding Challenge 0

Hello @everyone , time for an event :D This week will be a coding challenge! Basically I give you some questions, you give me some answers, and you get 50 points per answer, cool right? There will hopefully be more of these in the upcoming weeks, but for now here are this week's questions:

Challenge 0:

The user will input a number of days, the function will return the amount of seconds in those days.

Expected behaviour:

Please enter a number of days: 5

There are 432000 seconds in 5 days.

Challenge 1:

The user will input the time it took for a ball to fall from some height, the function will return the height from which that ball fell. (acceleration due to gravity: 9.8m/s, and, if you don't remember, here's the second equation of motion: Displacement = Initial velocity * Time + 1/2*Acceleration * Time^2)

Expected behaviour:

Please enter the time it took for the ball to fall (in seconds): 5

The height from which the ball was dropped: 122.5 metres.

Challenge 2:

The user will input two numbers, the function will return all the twin prime pairs between those two numbers (inclusive). (A twin prime pair: Two prime numbers that are separated by 1 number, like (5,7) and (11,13)

Expected behaviour:

Please enter the first number: 5

Please enter the second number: 25

Twin prime pairs between 5 and 25:

(5,7)

(11,13)

(17,19)

Okay, so you can answer 1, 2, or all 3 of these questions, and you get 50 points per answer. Also, you can use nothing but python any programming language you please!

When you're done with the code, you can either:

  1. Send it here with a spoiler tag
  2. Send it to me in a DM

In both cases, please put in your message the creatively chosen tag: #CodingChallenge0

You have until Monday 2/11 to submit your entries.

Have fun coding!

(and yes I am numbering things starting from 0, this is #tech-club after all)