0% found this document useful (0 votes)
11 views3 pages

FutureCoder Activity Solutions

The document outlines various programming tasks involving basic arithmetic operations such as addition, subtraction, multiplication, and conversion of units. It includes instructions for handling both integer and decimal inputs. Additionally, it suggests tasks like calculating hours from days and finding the area of a rectangle.

Uploaded by

noobhahag
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

FutureCoder Activity Solutions

The document outlines various programming tasks involving basic arithmetic operations such as addition, subtraction, multiplication, and conversion of units. It includes instructions for handling both integer and decimal inputs. Additionally, it suggests tasks like calculating hours from days and finding the area of a rectangle.

Uploaded by

noobhahag
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Activity solutions

Task 1 .

Find the sum of two numbers.


c

Subtract the second number from the first number.

a = int(input())
b = int(input())
result = a – b

Multiply two numbers.

a = int(input())
b = int(input())
result = a * b

Double a number.

a = int(input())
result = a * 2

Add three numbers.

a = int(input())
b = int(input())
c = int(input())
result = a + b + c

Find the sum of two decimal numbers.

Page 1
Activity solutions

a = float(input())
b = float(input())
result = a + b

Subtract the second number from the first number (decimals allowed).

a = float(input())
b = float(input())
result = a – b

Multiply two decimal numbers.

a = float(input())
b = float(input())
result = a * b

Task 2 .
 Calculate the number of hours in a given number of days.

 Ask for two numbers and add them together.

 Convert minutes into seconds.

Page 2
Activity solutions

 Find the square of a number.

 Calculate the area of a rectangle.

Page 3

You might also like