Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HI I am coding a python program that prints out all the RGB values using 3 nested loops for example RGB(0,0,0) RGB(0,0,1) RGB(0,0,2) ... RGB(0,0,255)

HI I am coding a python program that prints out all the RGB values using 3 nested loops

for example

RGB(0,0,0)

RGB(0,0,1)

RGB(0,0,2)

...

RGB(0,0,255)

RGB(0,1,0)

...

RGB(255,255,255)

# !/usr/bin/env python3 # created by: Adam # created on: Nov 2020 # this program is the "RGB code" def main(): counter_number1 = 0 counter_number2 = 0 counter_number3 = 0 for counter_number1 in range(256): for counter_number2 in range(256): for counter_number3 in range(256): print("RGB ({0}, {1}, {2})".format (counter_number1, counter_number2, counter_number3)) if __name__ == "__main__": main()

I tried this code but did not work it printed all the values which took about 10 min and at the end it just printed (255,253,pane is dead)

can you help me figure out the problem

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

Compare the different types of employee separation actions.

Answered: 1 week ago

Question

Assess alternative dispute resolution methods.

Answered: 1 week ago

Question

Distinguish between intrinsic and extrinsic rewards.

Answered: 1 week ago