PCEP Question and answers rated A+ PCEP: Coding Exercises - Set 1
Write a code that gets the input of one number and then a second number. Remember to use integer before the input and ask the question within the input.
Use the if statement to compare to see which one is greater and assign t...
PCEP: Coding Exercises - Set 1
Write a code that gets the input of one number and then a second number.
Remember to use integer before the input and ask the question within the
input.
Use the if statement to compare to see which one is greater and assign the
LARGER_NUMBER to the either number1 or number2.
Then use an else statement the assign the LARGER_NUMBER if the number
used in if was not large enough.
Print the code and include the text "The larger number" along with the
LARGER_NUMBER
Write a code that gets the input of three numbers and finds out the LARGEST
NUMBER.
Use 2 IF conditions without ELSE. For the first LARGEST NUMBER, do not
use the IF condition. Only use it for the 2nd and 3rd LARGEST NUMBERS.
For the first print function, combine 'my' 'name' 'is' with _ and end it with a ''so
that is prints like My name is
For the second print function, make it so that it prints Monty Python.
, The final should print the following in one line!
Modify the first line of code in the editor, using the sep and end keywords, to
match the expected output. Use the two print() functions in the editor.
Don't change anything in the second print() invocation.
a) without escape (second type of quotation marks)
b) with escape (backslash)
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller flyhigher329. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.99. You're not tied to anything after your purchase.