EXERCISE
2
(
a
)
Get three kilograms values from the user and keep it in an array called Kilo.
(
b
)
Access each of the kilogram values from array Kilo using a while loop, convert the kilogram into gram and store it in an array called Gram.
(
c
)
Display all the values from array Kilo and array Gram.
Enter Kilograms :
3
.
4
Enter Kilograms :
2
.
0
Enter Kilograms :
1
.
5
5
3
.
4
0
kilograms equals to
3
4
0
0
.
0
0
grams
2
.
0
0
kilograms equals to
2
0
0
0
.
0
0
grams
1
.
5
5
kilograms equals to
1
5
5
0
.
0
0
grams
Press any key to continue
Here is the Python code to achieve this:
Not the question you are looking for? Ask here!
Enter question by text
Enter question by image
Unlock Smarter Learning with AskSia Super!
Join Super, our all-in-one AI solution that can greatly improve your learning efficiency.