Find Jobs
Hire Freelancers

Python, R Programming Language

$10-30 USD

Selesai
Dibuat lebih dari 7 tahun yang lalu

$10-30 USD

Dibayar ketika dikirim
Define a main() function, a doTestOne() function, a doTestTwo() function and a doTestThree() function. The main() function should call doTestOne(), doTestTwo() and doTestThree() In doTestOne(), 1) Prompt the user for a number (e.g., "Please enter an integer.") 2) Using input() retrieve the number entered and store it in a variable called "userInput" 3) Convert the number from text to an integer 4) Determine whether or not the number is an even number by using the modulo operator. Hint: The expression x % 2 == 0 (modulo operator) evaluates to True when the remainder of x divided by 2 is 0. 5) If the number is even, print "Number entered is even" If the number is odd, print "Number entered is odd" In doTestTwo(), 6) Create two variables called 'hungry' and 'thirsty' 7) Set 'hungry' and 'thirsty' to either True or False (it doesn't matter which). 8) Write code that tests 'hungry' and 'thirsty' for all possible combinations of True and False. There are four possibilities. For example, hungry and thirsty can both be True, or both be False or one True and the other False. 9) Print the appropriate statement saying whether the user is hungry and/or thirsty based on conditions using 'if' and 'elif' In doTestThree(), 10) Prompt the user for a number. (For example, "Please enter an integer.") 11) Using input() retrieve the number entered by the user and store it in a variable called: "userInput" 12) Convert the number to an integer. 13) Using if and else statements, determine if the number entered is: Divisible by 2 and 3. Divisible by 2 and not 3. Divisible by 3 and not 2. 14) Print the appropriate outcome as shown above. Don't forget to execute the main function as your last line in the program. Add appropriate comments to the program and describe what each function does above the functions in comments.
ID Proyek: 11579481

Tentang proyek

3 proposal
Proyek remot
Aktif 8 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan
Diberikan kepada:
Avatar Pengguna
30 mins work
$15 USD dalam 1 hari
4,9 (240 ulasan)
6,7
6,7
3 freelancer menawar dengan rata-rata $18 USD untuk pekerjaan ini
Avatar Pengguna
Hello, Sir Weebside Inc. is a professional freelancer service provided to worthy clients like you. We can provide our best developers to provide you High-Quality Product with 100% Delivery Rate, 100% Satisfaction. Having Experts in Java, C / C++ , C# , VB , .NET , SQL, MySQL Programming Language and Frameworks made us capable to bid here. We can provide any service of any caliber within Hours. CHAT WITH US TO START RIGHT NOW. BEST DEVELOPERS AROUND. WITH HIGHEST QUALITY DELIVERED WITHIN TIME. WITHIN BUDGET. CLICK CHAT TO START CLICK CHAT TO START CLICK CHAT TO START CLICK CHAT TO START CLICK CHAT TO START
$14 USD dalam 1 hari
4,7 (51 ulasan)
5,2
5,2

Tentang klien

Bendera UNITED STATES
Austin, United States
5,0
15
Memverifikasi Metode pembayaran
Anggota sejak Nov 20, 2015

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.