Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For a given number n, print numbers divisible by 3 up to that number(n included) Example: if n=15, print 3,6,9,12,15 Hint you can use modulus

For a given number n, print numbers divisible by 3 up to that number(n included) Example: if n=15, print 3,6,9,12,15 Hint you can use modulus statement (if (i%3==0)) n=15

Question 2:

Generate 10 numbers between 0 and 1 and add into list. Print first three elements of that list.

Question 3:

write a for loop or method to calculate summation of first n numbers i.e if n=3, it will print or return 6 (1+2+3)

Question 4:

Write a method to calculate age for a given date of birth year. Use this method in order to calculate age of person if date of birth is 1944 if age is the name of function, print(age(1944))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Describe the process of advance refunding of the federal debt.

Answered: 1 week ago

Question

How does selection differ from recruitment ?

Answered: 1 week ago