Challenges ISlide solved ✓
The sets of challenges have no new information, only practical exercises. They are meant to test whether you've mastered the previous lessons.
They usually start out easy and gradually ramp up the difficulty. The last challenges in the set are relatively difficult.
If you find yourself stuck here, reviewing the previous lessons may be helpful.
Write a program that prints the string "solved".
Hint: remember to put quotes around the string.
Write a program that calculates
999*999 and outputs the result.
What happens if you multiply a string with a number? What do you think would make sense?
Find out by multiplying
"test" by 3 using the
* sign and printing the
Write a program that creates a variable. Store a string in the variable. The string should be the letter 'a' 10 times in a row.
Then print the variable.
Your program should output:
(If you want, you can use the trick you just learned, instead of typing 'a' 10 times.)
Multi-line hello world
Make your program output "hello" on one line, and "world" on the next line by calling the print function twice.
In other words, your program must output:
Hint: remember to put quotes around your strings.
Imperial to metric
Store the number
6 in a variable called
Then store the number
3 in a variable called
30.48*feet + 2.54*inches in a variable called
cm to see how many centimeters 6 feet and 3 inches are.
(Hint: there are no strings in this challenge, so don't use any quotes at all.)