Giter VIP home page Giter VIP logo

control_flow_statements02's Introduction

Welcome

elif statements

Automated grading of homework assignments and tests

  • fork this repository
  • solve the task
  • commit with proper message
  • commit with proper message

Problems

if01

Find the largest of the numbers.

Example 1:

Input: a=1 b=4 c=2
Output: 4

Example 2:

Input: a=-5 b=-3 c=-1
Output: -1

Constraints:

  • -1018<=num<=1018

if02

Find the smallest of the numbers.

Example 1:

Input: a=1 b=4 c=2
Output: 1

Example 2:

Input: a=-5 b=-3 c=-1
Output: -5

Constraints:

  • -1018<=num<=1018

if03

Determine the number between large and small.

Example 1:

Input: a=3 b=7 c=1
Output: 3

Example 2:

Input: a=5 b=5 c=-1
Output: 5

Constraints:

  • -1018<=num<=1018

if04

Return zero if the numbers are equal, return the larger one if they are not equal.

Example 1:

Input: a=3 b=7
Output: 7

Example 2:

Input: a=5 b=5
Output: 0

Constraints:

  • -1018<=num<=1018

if05

Find the largest digit of the five-digit number.

Example 1:

Input: n=23546
Output: 6

Constraints:

  • -1018<=num<=1018

if06

Find the index of the largest digit of the five-digit number.

Example 1:

Input: n=76514
Output: 5

Example 2:

Input: a=54694
Output: 2

Constraints:

  • -1018<=num<=1018

if08

Return the days of the week, return the days of the week according to the numbers 1 to 7. Use the elif statments. 1: "Monday" 2: "Tuesday" 3: "Wednesday" 4: "Thursday" 5: "Friday" 6: "Saturday" 7: "Sunday"

Example 1:

Input: n=2
Output: "Tuesday"

Example 2:

Input: a=6
Output: "Saturday"

Constraints:

  • -1018<=num<=1018

Warning

  • don't copy other solutions or any solution
  • don't remove comments

control_flow_statements02's People

Contributors

xmaxkambek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.