Ws 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

14 Challenges 1 - 11: The Basics

Challenges
001 002
Ask for the user’s first name and Ask for the user’s first name and then ask for
display the output message their surname and display the output message
Hello [First Name] . Hello [First Name] [Surname].

003
Write code that will display the joke “What do you call a bear with no
teeth?” and on the next line display the answer “A gummy bear!” Try to
create it using only one line of code.

004 005 006


Ask the user to enter Ask the user to enter three Ask how many slices
two numbers. Add numbers. Add together the first of pizza the user
them together and two numbers and then multiply started with and ask
display the answer as this total by the third. Display the how many slices
The total is answer as The answer is they have eaten.
[answer]. [answer]. Work out how many
slices they have left
007 and display the
answer in a user-
Ask the user for their name and their age. Add 1 to their age
friendly format.
and display the output [Name] next birthday you
will be [new age].
Keep
going,
008 009 you
Ask for the total price of the bill, then ask how are
Write a program
doing
many diners there are. Divide the total bill by the that will ask for a well.
number of diners and show how much each number of days
person must pay. and then will
show how many
hours, minutes
010 and seconds are
There are 2,204 pounds in a kilogram. Ask the in that number of
user to enter a weight in kilograms and convert it days.
to pounds.

011
Task the user to enter a number over 100 and then enter a number under
10 and tell them how many times the smaller number goes into the larger
number in a user-friendly format.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy