[SOLVED] CS104 Lab 3

29.99 $

Category: Tags: , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab3-pfntqb.zip (105 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

1. Implement a calculator that retrieves two floating input numbers and an operation name (addition, subtraction, multiplication, division) from the user. It makes the calculation and prints the result as the output. For example, you can use the following code to retrieve floating number from the user.

number1 = float(input(“Enter the first number: “))

2. Write a for loop to produce the following output:

100 81 64 49 36 25 16 9 4 1

3. Write a nested for loop to produce the following output:

1111
2222
3333
4444

Hint:

First, try this one:

*
**
***

Then, this one:

1111
2222
3333
4444

and combine.

4. Implement a program to produce the following output:

*
***
*****
*******
*********
*********
*******
*****
***
*

5. Write nested for loops to produce the following outputs:

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

1
2 3
5 8 13
21 34 55 89
144 233 377 610 987

  • Lab3-pfntqb.zip